MkMapview setRegion under ios6 snaps to grid like ios5, no precise setRegion possible

一世执手 提交于 2019-12-22 09:14:11

问题


It is well known that using setRegion with MkMapKit under ios5 snaps to the next available Google zoom level, so a precise programatic setting of the map region was not possible (without special tricks, like using transformation matrix on mapView)

But for some strange reasons using setRegion or setMapRect under iOS 6.1.3 iphone4 shows the same behavior as in iOS5, although this works on ipad ios6.1.3.
iphone4 and simulator can only use regions double or half size from the prevoius one.

So there must be something that the MkMapKit forces to behave like iOS5 although having vectors. This happens on ios simulator, on ios4 device, but not on iPad with ios 6.1.3

I change the region 2 seconds after end of viewDidAppear(), so this cannot be a timing issue. The region values are precisly calculated.

I have set deployment target to ios 6.1 and am developping under Xcode 4.6, but the project was created 2 years ago under Xcode 3.

The only thing that is a bit unusual, is that my mkMapView.frame is quadratic, and bigger than the screen, equal to the diagonal (for self rotating).

How do i solve that, such that setRegion exactly uses the specified longitudinal span?
Or is this known that it does not work?

来源:https://stackoverflow.com/questions/18166176/mkmapview-setregion-under-ios6-snaps-to-grid-like-ios5-no-precise-setregion-pos

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!