将CGPoint转换为Lat Long

时间:2013-07-22 16:46:07

标签: mkmapview latitude-longitude

我有一个CGPoint,我需要将它转换为lat long。

CGPoint centerOfMap = CGPointMake(mapView.frame.size.width/2,mapView.frame.size.heigh/2);
CGPoint topMidOfMap = CGPointMake(centerOfMap.x, centerOfMap.y-200); //Step 1
//Now get difference of longitude and latitude
CLLocationCoordinate2D centerOfMapCoord = [mapView convertPoint:centerOfMap toCoordinateFromView:mapView];   //Step 2
CLLocationCoordinate2D topMidOfMapCoord = [mapView convertPoint:topMidOfMap toCoordinateFromView:mapView];   //Step 2

我无法为CGPoint获得准确的lat。有什么指针吗?

0 个答案:

没有答案
相关问题