Looking for ios Answers? Try Ask4KnowledgeBase
Looking for ios Keywords? Try Ask4Keywords

iOS Set Zoom/Region for Map


For setting some zoom level, let say we want to zoom user's location with user location as center and 2km of area as radius. Then, we use following code

MKUserLocation *userLocation = _mapView.userLocation;
MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance (userLocation.location.coordinate, 2000, 2000);
[_mapView setRegion:region animated:NO];