我是iPhone应用的初学者。我要开发的应用程序使用谷歌地图。当用户在地图屏幕中拖动并更改地图屏幕的内容时,我想要得到当前地图屏幕中的东北和西南坐标。在用户缩小/放大后,用户可以更改地图屏幕的内容。在这种情况下,我必须得到东北和西南的坐标。我没有找到解决这个问题的方法。
发布于 2011-11-03 23:40:47
您可以这样做(See that question):
MKMapRect mapRect = self.mapView.visibleMapRect;
MKMapPoint cornerPointNE = MKMapPointMake(mapRect.origin.x + mapRect.size.width, mapRect.origin.y);
CLLocationCoordinate2D cornerCoordinateNE = MKCoordinateForMapPoint(cornerPointNE);
MKMapPoint cornerPointSW = MKMapPointMake(mapRect.origin.x, mapRect.origin.y + mapRect.size.height);
CLLocationCoordinate2D cornerCoordinateSW = MKCoordinateForMapPoint(cornerPointSW);https://stackoverflow.com/questions/7997613
复制相似问题