MKMapPointForCoordinate中使用的算法是什么?

时间:2015-03-13 19:54:09

标签: mapkit mercator

MKMapPointForCoordinate中使用的算法是什么?换句话说,如何在Apple的生态系统之外将MKMapPoint转换为纬度/经度,反之亦然?

1 个答案:

答案 0 :(得分:2)

为了在Apple系统内转换它:

MKMapPoint yourPoint;
CLLocationCoordinate2D location = MKCoordinateForMapPoint(yourPoint);
NSLog(@"%@", location.latitude);
NSLog(@"%@", location.longitude);

Apple如何做到这一点?在这里,您可以阅读here

基本上,它使用墨卡托地图投影:

http://mathworld.wolfram.com/MercatorProjection.html