I want to load a large list of locations on my MapKit and display them all with custom pin image and annotation I'm able. / P>
The issue I am arriving is that I currently have all the annotations displaying the same title, subtitles and pinimage.
How do I create it so that I can set every comment with it's own title and different PIN image? I'm trying to figure out which annotation is being set through the map: Visual FOr Annotation.
- (NSString *) subtitles {@ @ This annotation is the subtitle.); } - (NSString *) title {return @ "title of annotation"; } - (MkAnnette Viv *) MapView: (Mkmapview *) MapView Visual Presentation: (ID & lt; Mk Animation & gt;) Annotation {if (annotation == mapView.userLocation) {return zero; } MK annotationview * NIUUUU = [[[MKNetation Weave Alloc] Init With Annotation: Annotation Reuse Identifier: @ "CurrentLooc"]; AnnView.canShowCallout = Yes; AnnView.calloutOffset = CGExMake (-5, 5); UIImage * Pin Image = [UIImage Image Named: @ "MPPIN.png"]; AnnView.image = pinImage; Return annually; } "
You have to enter the annotation object and access it to your custom type As you change the annotations, you come back.
Apple's Weather Map Sample Project is a good example of how to do this.
MapCallouts Sample Project is a single idea, but a simple implementation.
Comments
Post a Comment