I tried to set visibleMapRect
property of MKMapView object but result map rect is not the exact what I expected.
This is my code:
NSLog(@"current size %f %f", mapView.visibleMapRect.size.width, mapView.visibleMapRect.size.height);
NSLog(@"target size %f %f", newBounds.size.width, newBounds.size.height);
mapView.visibleMapRect = newBounds;
NSLog(@"new size %f %f", mapView.visibleMapRect.size.width, mapView.visibleMapRect.size.height);
And this is the result:
2013-01-15 19:21:25.440 MyApp[4216:14c03] current size 67108864.594672 46006272.643333
2013-01-15 19:21:25.441 MyApp[4216:14c03] target size 3066685.527175 2102356.690531
2013-01-15 19:21:25.442 MyApp[4216:14c03] new size 4194304.162631 2875392.126220
What kind of magic is this? And how can I set the precise visible rect to my map view?