3
votes

After browsing some of the questions here, I have got a rough idea of zoom level and MKMapView. Then I found this great blog:

http://troybrant.net/blog/2010/01/set-the-zoom-level-of-an-mkmapview/

But when I tried out the code from that blog, I felt there seemed to be an upper limit for zoom level. That is to say, no matter how large I set zoomLevel to be, it was always clamped to some thing like 16. The corresponding longitudeDelta of this zoomLevel was 0.003433.

In this question, MKMapView setRegion "snaps" to predefined zoom levels?, pseudopeach claimed that the smallest value for longitudeDelta is .0008583, instead of .003433. Anyone knows how to get to .0008583 on iPhone?

Thanks in advance.

1

1 Answers

0
votes

You can set the longitudeDelta in code in following ways-

MKCoordinateRegion region;
region.span.latitudeDelta = 0.0008583;
region.span.longitudeDelta = 0.0008583;
[mapView setRegion:region animated:YES];