I have three pins on a mapview. I'd like to give each one a different color. In the delegate method viewForAnnotation, I'm doing this:
- (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>) annotation{
MKPinAnnotationView *annView=[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"anAddress"];
annView.pinColor = MKPinAnnotationColorGreen;
annView.animatesDrop=TRUE;
annView.canShowCallout = YES;
annView.calloutOffset = CGPointMake(-5, 5);
return annView;
}
I was thinking to create an array of MKPinAnnotationViews but how can I get the correct one since the delegate method isn't indexed to anything?