Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8677251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:24:38+00:00 2026-06-12T20:24:38+00:00

I am developing an iphone application,in that app i am showing the client Parking

  • 0

I am developing an iphone application,in that app i am showing the client Parking places in different locations on MKMapView. Now I need to use compass mode in MKMapView to show the client parking places in particular direction (SE,SW,NE,NW), for that I run this below code.

-(void)updateHeading:(CLHeading *) newHeading  
{ 

  NSLog(@"New magnetic heading: %f", newHeading.magneticHeading);
  NSLog(@"New true heading: %f", newHeading.trueHeading);

  double rotation = newHeading.magneticHeading * 3.14159/-180;

  [mapView setTransform:CGAffineTransformMakeRotation(-rotation)];

  [[mapView annotations] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop)
 {
    MKAnnotationView * view = [mapView viewForAnnotation:obj];

    [view setTransform:CGAffineTransformMakeRotation(rotation)];

 }];  
}

Everthing works fine in MKMapView, but my MKMapView shows in reverse order, when the device starts rotating, I am facing this problem in ios5 and ios6 also.
NOTE: when I test this app in America, map shows correctly, while I test the app in my location (India) Map turns into reverse.

MKMapView shows reverse map, while device starts rotating.
`

Thanks in advance for any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T20:24:39+00:00Added an answer on June 12, 2026 at 8:24 pm

    Is the map intended to be centered on the user while rotating? If so you could just set the MKMapView’s userTrackingMode to MKUserTrackingModeFollowWithHeading.

    If not then how about telling us what you see in magneticHeading, trueHeading and rotation when things go right and when they go wrong.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing an iPhone app. I need to create a Quiz application that has
I'm developing a iPhone application that will use a Google App Engine backend and
I'm developing one application for iphone using phone gap.I that I need to display
I'm developing an iPhone application that makes heavy use of Core Data, primarily for
I'm developing an iphone app that makes use of of a UIWebView to display
I'm developing an iPhone application that have a TabBarController with two tabs. Each tab
I am developing an iPhone application that retrieves the data from remote MySQL server.
I am new to iPhone application development. In the application that I am developing
In an iPhone application I'm developing I have a Image View that displays eyes
I am new to this iPhone development. Am developing a catalogue application. In that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.