0
使用iOS设备,我有兴趣使用mapview并获取该地点的纬度/经度坐标。这可能吗?使用iOS MapView的位置指定
使用iOS设备,我有兴趣使用mapview并获取该地点的纬度/经度坐标。这可能吗?使用iOS MapView的位置指定
您可以使用convertPoint:toCoordinateFromView
方法得到CLLocationCoordinate2D
MKMapView
的方法。
CLLocationCoordinate2D coordinate = [self.mapView convertPoint:[gesture locationInView:self.mapView] toCoordinateFromView:self.mapView];
我把它放在一个水龙头手势处理程序工作。但是,如果您使用其他某种机制获取触点,则可以使用触点作为在convertPoint:
中传递的参数。
@ user797678对此有帮助吗?你需要进一步的帮助吗? – 2011-06-19 18:17:45