0
votes

I am implementing showuserlocation=TRUE property to show a blue dot on map.
Clicking on blue dot will produce a callout with title Current Location.

I am referring the Default Maps App on iPhone. I have applied the Headings to it so it rotates to show North same as Maps App.

But when my map rotates as with Heading, Current Location Callout also rotates.

I want it to stay at one place as in iPhone Map App.

1
What does "along with torch" mean?user467105

1 Answers

1
votes

If you want callout to be vertical at all times

- (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading
{

for (id<MKAnnotation> annotation in mapView.annotations) 
    {
      NSLog(@"keep callout vertical");
      MKAnnotationView* annotationView = [mapView viewForAnnotation:annotation];
     [annotationView setTransform:CGAffineTransformMakeRotation(0)];
   }
}