2

I am trying to get the current zoomScale for mapview. I was using

zoomScale = self.mapView.bounds.size.width/ self.mapView.visibleMapRect.size.width;

But the zoomScale does not equal to the one passed to

  • (void)drawMapRect:(MKMapRect)mapRect zoomScale:(MKZoomScale)zoomScale inContext:(CGContextRef)context

if i use zoomScale = 2*self.mapView.bounds.size.width/ self.mapView.visibleMapRect.size.width, it can euqal to the one in drawMapRect method on retina iphone but not for any ipad.

So I am still not sure how to get the correct zoomScale for any device, the zoomScale should match the one n drawMapRect.

Thanks in advance,

James

4

1 回答 1

0

我不认为你得到缩放比例。地图由 MKCoordinateRegion 类型的地图区域缩放。

于 2013-09-06T17:01:54.427 回答