Is it possible to add a CalloutAccessoryView to the default pin (pulsing blue dot, with accuracy cirle) when showing the user location. In the code below you create your own pin and add the 'pinView.rightCalloutAccessoryView' when the annotation is not the user location, can this be done when it is the user location but still using the default pin or do you have to use your own pins for this functionality?
- (MKAnnotationView *)mapView:(MKMapView *)mV viewForAnnotation:(id )annotation
{
MKPinAnnotationView *pinView = nil;
if(annotation != mapView.userLocation)
{
static NSString *defaultPinID = @"com.invasivecode.pin";
pinView = (MKPinAnnotationView *)[mapView dequeueReusableAnnotationViewWithIdentifier:defaultPinID];
if ( pinView == nil )
pinView = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:defaultPinID] autorelease];
pinView.pinColor = MKPinAnnotationColorGreen;
pinView.canShowCallout = YES;
pinView.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
pinView.animatesDrop = YES;
}
else
[mapView.userLocation setTitle:@"I am here"];
return pinView;
}
Thanks.