please help, this question has been asked so many times before, but peoples suggestions have no effect on my outcome, all i want, is the pin and blue circle (Accuracy) to be shown on the map, here is my implementation. – oh, im using an iPhone device – im not in the simulator
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation{
NSLog(@"View for Annotation is called");
if (NSClassFromString(@"MKUserLocation")==[annotation class]) {
return nil;
}
if (annotation == mapView.userLocation) {
return nil;
}
MKPinAnnotationView *annView=[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"currentloc"];
annView.pinColor = MKPinAnnotationColorGreen;
UIButton * btn = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
annView.rightCalloutAccessoryView = btn;
annView.animatesDrop=TRUE;
annView.canShowCallout = YES;
annView.calloutOffset = CGPointMake(-5, 5);
pinDropped = TRUE;
return annView;
}
cheers in advance…. bloody thing
make sure implemented [mapview addAnnotation:annotation];
thanks Anna for the reminder.