I have MKMapView and I am showing it on viewdidload using following code. However i want to display map of 2.5 Miles Radius when the view loads for the first time and then allow user to zoomin – zoomout.
Let me know how can i set zoom level of 2.5 Miles radius.
Please let me know if I sounds unclear.
Thanks,
Jigar
//[mapListBgView setMapType:MKTYP];
[dataDisMapView setMapType:MKMapTypeSatellite];
[dataDisMapView setZoomEnabled:YES];
[dataDisMapView setScrollEnabled:YES];
MKCoordinateRegion region = { {0.0, 0.0 }, { 0.0, 0.0 } };
region.center.latitude = 25.76 ;
region.center.longitude = -80.19;
[dataDisMapView setRegion:region animated:YES];
Use the
MKCoordinateRegionMakeWithDistance()function to create an appropriately sized region. The only thing you have to do is manually convert from miles to meters.