views:

48

answers:

0

Here is my question: When I am trying to set the zoom level of my map, I is zooming to a different level than I requested.

Here is the code I am using:

        MKCoordinateRegion cRegion =                       
        MKCoordinateRegionMake
        (myMapView.userLocation.coordinate, MKCoordinateSpanMake(.001, .0001));

        MKCoordinateRegion aRegion = [myMapView regionThatFits:cRegion];
        [myMapView setRegion:cRegion animated:YES];

The first thing I do is create a region with the span being .001 in the latitude direction and .0001 in the longitude direction. My reasoning is that this will give me a sliver that spans exactly .001 degrees latitude. Then I can throw it into regionThatFits: and it will spit out a region that spans .001 degrees latitude and whatever my map view needs to span in the longitude direction to keep that aspect ratio. Instead I get:

  Lat Range: 0.000969508
  Long Range: 0.000858307 

Any idea why the Lat Range, which I thought would be .001 isn't?

Thanks in advance for your help!