how to add multiple annotation for iphone
Right now I can show current and destination now I want a dummy pin in midway say any location but I want to know how to add 3 pins in map
if(annotation != mapView.userLocation)
{
NSLog(@"marked");
static NSString *defaultPinID = @"com.invasivecode.pin";
开发者_如何学CpinView = (MKPinAnnotationView *)[mapView dequeueReusableAnnotationViewWithIdentifier:defaultPinID];
if ( pinView == nil )
pinView = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:defaultPinID] autorelease];
pinView.pinColor = MKPinAnnotationColorGreen;
pinView.canShowCallout = YES;
pinView.animatesDrop = YES;
}
精彩评论