How to deal with inconsistent Chinese maps on iOS 6?

醉酒当歌 提交于 2019-12-30 01:37:27

问题


For Chinese maps on iOS 6, it seems that MapKit selects map provider based on your where the device is located. If you're in China it will use AutoNavi maps, and else it will use the default Apple maps. To complicate things, the AutoNavi maps seem to be transformed in the same way that Google's maps on iOS 5 are, whereas the default Apple maps are not transformed.

By transformed I'm talking about the fact that all maps in China are transformed, although this is not true. Rather, some maps in China are transformed, while some are not.

This transform makes it difficult to place annotations correctly on the map since the map is generally offset about 500 meters. Since it's not possible to reverse the transform of the actual map, the solution is to apply the same offset to the annotations.

There exists non-trivial ways to inverse the transform, at least for limited areas. The problem in iOS 6 is knowing whether or not the map is transformed to be able to compensate annotations appropriately. On iOS 5 this problem did not exist since the transformed maps were used consistently.

The Shanghai maps below illustrates the situation (the actual transform offset is not demonstrated).

So, would there be any way of knowing in run-time whether transformed or non-transformed China maps are used? Other ideas for dealing with this?

Edit: Routing network traffic through a proxy in China changes map apperance in the simulator, so the choice of map provider must be based on IP.


回答1:


You could always use Bing Maps SDK if you absolutely need consistency - that is consistency between iOS versions and between people in USA or China. Although I would recommend sticking with MapKit.




回答2:


It's about Martian Coordinate Systems. Check this out: https://github.com/Mardinate/Mardinate




回答3:


Couldn't you get geo data from the phone and if they are in china apply the transformed annotations?



来源:https://stackoverflow.com/questions/12511588/how-to-deal-with-inconsistent-chinese-maps-on-ios-6

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