简体   繁体   中英

mapkit annotations - displaying more than one location pin

does anyone know how to display more than one location on a map? i have a map w/ one pin at a lat/long point. I'd like to have pins for many locations.

another related question - if i wanted a map to display all McDonalds in the California, for example, is there a way to do this by feeding a search result from google maps into my app?

thanks in advance for any help/hints.

G.

You can add as many MKAnnotation as you'd like, and you will see a pin for each of them. You can add multiple annotations at once by calling

[myMKMapView addAnnotations:(NSArray*)array];

instead of

[myMKMapView addAnnotation:(id <MKAnnotation>)];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM