开发者

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;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜