Reputation: 1831
What is the best way to zoom an MKMapview to closest two or three MKAnnotations for current user location?
I have a list of GPS coordinates (328 to be precise) loaded from a plist, every point is an annotation on the map. I'd like to limit the view to the two nearest annotation points around the user's current location.
Upvotes: 0
Views: 955
Reputation: 19867
Roughly, the steps would be:
MKMetersBetweenMapPoints
to find distance from current locationMKCoordinateRegionMakeWithDistance
[mapView setRegion:region animated:TRUE]
Upvotes: 1