Issue
I want to show multiple pin annotations on a mapview.
I am getting multiple hotel location lat long from server and i have store them in NSMutableArray
, now I want to show these lat long value on my mapview.
Solution
You need to create a model object that conforms to the MKAnnotation protocol. At the very least, it should implement the coordinate
method (which returns a CLLocationCoordinate2D
struct for your latitude and longitude). If you want to display a callout for the map pin, you'll also need to implement the title
method.
You should create one of these objects for each lat,lon pair, and store these in your array. Then call the addAnnotations:
on your mapView with the array of objects
Answered By - Ashley Mills
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.