I am trying to add a custom image instead of the regular pin on the map. But it remains a red pin... What am I missing?
- (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>) annotation{
static NSString* AnnotationIdentifier = @"AnnotationIdentifier";
MKPinAnnotationView *annView = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:AnnotationIdentifier];
annView.animatesDrop = TRUE;
annView.image = [UIImage imageNamed:@"CustomPin.png"];
return annView;
}
Hi just remove one line from your code...
annView.animatesDrop = TRUE;
Remain Code-
MKMapView: Instead of Annotation Pin, a custom view
I found it helpful to look at Apples Documentation and download the sample code.
http://developer.apple.com/library/ios/#samplecode/MapCallouts/Introduction/Intro.html#//apple_ref/doc/uid/DTS40009746
They are implementing a custom annotation for their map.