我正在开发一个 iPhone 应用程序,其中我在工具栏上提供了 Pin Annotation 按钮。当用户单击按钮时,图钉将落在地图视图的中心。现在我希望该用户移动该图钉并将其放置在他们想要的位置,我将获得该点的纬度和经度。那么我如何用我的地图视图定义所有这些事件呢?怎么做?我得到这个添加注释的代码。
- (void)addPinAnnotation:(id)sender {
UICRouteAnnotation *pinAnnotation = [[[UICRouteAnnotation alloc] initWithCoordinate:[routeMapView centerCoordinate]
title:nil
annotationType:UICRouteAnnotationTypeWayPoint] autorelease];
[routeMapView addAnnotation:pinAnnotation];
}
如何获得该点的纬度和经度?
提前致谢....