Is there a way to open multiple calls on many MKPointAnnotations on a MKMapView?

综合技术 2018-04-10

I was wondering if it is possible to to that or if it is not what are the alternatives? I need some information that need to be shown on the map and I'm having trouble with it... MKPointAnnotation gives a good interface but I haven't been able to open more than 1 callout at once. Thanks!

I found the solution:

You need to read this first:

http://developer.apple.com/library/ios/#DOCUMENTATION/UserExperience/Conceptual/LocationAwarenessPG/AnnotatingMaps/AnnotatingMaps.html

and then there's an example on it here:

http://shawnsbits.com/blog/2011/04/12/custom-map-pins-for-mapkit/

The key is to load your array of annotations with the customized images in the viewDidLoad and then in mapView:viewForAnnotation: create a new MKAnnotationView and load the image into it by casting the annotation to the customized annotation that is being passed to it.

I hope this helps. Sorry if it looks kinda confusing!

Hello, buddy!

责编内容by:Hello, buddy! (源链)。感谢您的支持!

您可能感兴趣的

Off-Topic Map of sdk In my application i have a MkMapview and now it shows current location. i have t...
MKMapView mosaics are not loaded with zoom I've got an issue. I'm using a MKMapView for displaying some annotations. I ini...
Add a subview to MKMapView that is above the map b... For an app I'm building, I have a custom "old map" effect PNG that I'd like t...
Detect valve on MK ANNOTATION see call-by-call I have an annotation on the map. When I select a annotation I will display callo...
Multiple Pins with Multiple Colors MKMapView How can I show multiple colors for my pins ? I have one pin with this funct...