views:

647

answers:

2

Hello

Im currently strugglung with annotations. how can i prevent the AnnotationLable for the blue GPS-point. (Here is an Image)

- (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(MKAnnotation *) annotation{


 if (annotation == mapView.userLocation) { 
  return nil;
 }

the function above isnt working, and i realized that i can't compare two coordinates.

Any hint is welcome. Simon

A: 

You are comparing an annotation to a location in your if.

Are you trying to supress the current location annotation for a reason? It is common UI with map kit and the consistency helps users understand the blue dot.

Nick
so i shouldn't deactivate it ?!
Simon
I don't know exactly what you are trying to accomplish maybe you can share a bit more. The "current location" label only appears if a user taps it and it can be helpful when someone isn't sure what the flashing blue dot is. A veteran user is going to know but someone who is new can find it helpful.
Nick
A: 

Does this help at all?

In the MapViewController class:

- (void)viewDidLoad{ 
    mapView.showsUserLocation = YES;
    ...
BlueSky
I quote Nicks answer: "It is common UI with map kit and the consistency helps users understand the blue dot." Thats it, I think you're missing the point
Simon