4

你好,

我有一个带有一些标记点的 Mapview + 当前位置的标记。

现在,我在这里要做的是,当用户拖动或遍历地图视图时,我想在地图被拖动后找到新中心位置的坐标(纬度,经度)。

我想再次澄清一下,我不是在谈论拖动标记/点,我是在谈论通过触摸拖动地图。

提前致谢。

4

2 回答 2

7

Look for theMapView.region.center or theMapView.centerCoordinate (should be the same) in your MapView's delegate -mapView:regionDidChangeAnimated: method.

于 2010-03-06T07:16:56.267 回答
1

Judging by this document:

http://developer.apple.com/iphone/library/DOCUMENTATION/MapKit/Reference/MKMapView_Class/MKMapView/MKMapView.html

You can get that with the centerPosition property of your MKMapView. To tell when the location changes, implement the -mapView:regionDidChangeAnimated: method in your MKMapViewDelegate.

于 2010-03-06T07:14:33.747 回答