Relation between MKMapRect and Spherical Mercator Resolution

MKMapRect projected coordinate system used in iOS MapKit  is not the same as Spherical Mercator used by Google, Bing and others. However there is a close linear relationship of the resolution in official spherical mercator and scale used by MapKit and that is   0.149291.

this number is constant for this relation :spherical mercator resolution (e.g. used by OpenLayers)  * zoomscale (used in MapKit)

spherical mercator resolution calculated as : spherical mercator width / view width

zoomscale in MapKit is calculated as : view width / mkMapRect.size.width

that is : spherical mercator width / mkMapRect.size.width = 0.149291  always.

So now any resolution from Spherical Mercator can be directly mapped into the MapKit internal coordinate system (mkMapRect) and vice versa without heavy calculations from mkMapRect to WGS84 and then to Spherical Mercator.

more about projection used in MapKit can be found here : LocationAwarenessPG

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.