KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
After 2 hours of googling I couldn't find an answer so this is my last shot. I would like to use a custom annotation for the user current location on a mkmapview. But I also want to have the blue accuracy circle around it. Can this be done? If not, can I add a call-out to the default blue dot with circle? The reason that I need this is because on my app, the current location dot often disappears under other annotations. So that's why I use a purple pin with a call-out as current location. Here is my code for the annotation: if ([annotation isKindOfClass:MKUserLocation.class]) { MKPinAnnotationView *userAnnotationView = (MKPinAnnotationView *)[self.mapView dequeueReusableAnnotationViewWithIdentifier:@"UserLocation"]; if (userAnnotationView == nil) { userAnnotationView = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"UserLocation"]autorelease]; } else userAnnotationView.annotation = annotation; userAnnotationView.enabled = YES; userAnnotationView.animatesDrop = NO; userAnnotationView.pinColor = MKPinAnnotationColorPurple; userAnnotationView.canShowCallout = YES; [self performSelector:@selector(openCallout:) withObject:annotation afterDelay:0.01]; return userAnnotationView; } Thanks for any advise. Cheers, Christian
Tags (comma-separated)
Save Edits
Cancel