Is there a easy way to hide it? I use the user location, but I don't want to show the blue dot. How can I hide it?
-- edit--
Am I using something wrong?
@interface ALMapaViewController : UIViewController <MKMapViewDelegate,
MKAnnotation>
{
IBOutlet MKMapView *mapaPrincipal;
id<ALMapaViewControllerDelegate> delegateMap;
CLLocationCoordinate2D coordinate;
}
my .m
@implementation ALMapaViewController
- (void)viewDidLoad{
[super viewDidLoad];
[mapaPrincipal setMapType:MKMapTypeStandard];
[mapaPrincipal setZoomEnabled:YES];
[mapaPrincipal setScrollEnabled:YES];
[mapaPrincipal.userLocation addObserver:self
forKeyPath:@"location"
options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld)
context:nil];
[mapaPrincipal setShowsUserLocation:YES];
}
-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
MKCoordinateRegion region;
region.center = mapaPrincipal.userLocation.coordinate;
MKCoordinateSpan span;
span.latitudeDelta = 0.005f;
span.longitudeDelta = 0.005f;
region.span = span;
[mapaPrincipal setRegion:region animated:YES];
self.coordinate = region.center;
[mapaPrincipal addAnnotation:self];
[mapaPrincipal setShowsUserLocation:NO];
}
@end
I already used the showUserLocation
and it still show the blue dots.