【发布时间】:2012-06-19 07:55:10
【问题描述】:
在我的 ios 应用程序中,我想在地图上放置一个默认情况下始终显示标注的图钉。在该标注上我显示的是 lat,long of pin。
我想要的是图钉始终保持在地图的中心。当用户移动地图时,图钉不会移动,但它的纬度在移动地图后会发生变化。
我还想显示该纬度、经度的地址。
请指点有哪些方法。
我已经尝试过这段代码
[mMapView setUserTrackingMode:MKUserTrackingModeFollow animated:YES];
MyAnnotation* obj = [[MyAnnotation alloc] initWithLocation:mMapView.centerCoordinate withPinType:StartPoint];
[obj setTitle:[NSString stringWithFormat:@"%f, %f",mMapView.centerCoordinate.latitude,mMapView.centerCoordinate.longitude]];
[mMapView selectAnnotation:obj animated:YES];
[mMapView addAnnotation:obj];
在当前位置缩放地图 在地图中心添加图钉 显示经纬度
问题 - 当我移动 map.pin 时,也被移动了,lat long 没有改变
【问题讨论】: