I wish to set the zoom level (OR set region) of MKMapView such that I can show a locality. Elaborating my context with an example. I have a location (CLLocation *) of which I found out the locality using CLGeocoder (reverse geocoding). Now, say the locality is 'Cupertino, CA' area. How do I find the region that completely encloses Cupertino in MKMapView?
Thank you.
Create
MKCoordinateRegion
object and set map view region for that:Edit:
As you mention in your comment that you need dynamic city enclosure. In that case we need map zoom level (an integer value - default is 0) .
That means some API or web service which return's city/co-ordinates and zoom level. So that from that zoom level we can achieve map span/region calculation.
And a link to get zoom level from lat/long: http://troybrant.net/blog/2010/01/set-the-zoom-level-of-an-mkmapview/