28

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).

ios 6 chinese maps

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.

Cory Kilger
  • 12,934
  • 2
  • 31
  • 24
Anton
  • 5,521
  • 5
  • 31
  • 51
  • Is the decision of which map to serve based on the geolocation of the requesting device, or the locale set for the device? If it's based on locale, is it possible to set the locale when requesting the map in order to get a consistent result? – Snips Sep 20 '12 at 14:24
  • Changing the device locale does not make a difference, so it seem to be based on geolocation using IP or internal location services. – Anton Sep 20 '12 at 14:46

3 Answers3

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.

Daniel
  • 22,521
  • 12
  • 107
  • 150
1

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

Ronnie Xiang
  • 71
  • 1
  • 6
0

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

j_mcnally
  • 6,723
  • 1
  • 27
  • 46
  • 1
    I could, but I can't really know for sure what the map provider choice is based on. Other regions that China may possibly be affected and it may change in the future. – Anton Sep 25 '12 at 20:37