iphone mapkit拖动并获取中心位置 [英] iphone mapkit drag and get center location

查看:171
本文介绍了iphone mapkit拖动并获取中心位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个Mapview,有一些标记点+当前位置的标记。现在,我想要做的是,当用户拖动或遍历mapview时,我想要在拖动地图后查找新中心位置的坐标(经度,纬度)。



我想再次澄清一下,我不是在说拖动标记/点,而是在谈论拖动地图。

预先感谢。

解决方案寻找 theMapView.region.center 或<$ c $ b> MapView的委托 -mapView:regionDidChangeAnimated:方法中的MapView.centerCoordinate (应该是相同的)。


HI,

I have a Mapview with some marker points + a marker for current location.

Now, what I want to do here is, when user drag or traverse through mapview, I want to find coordinate (latitude, longitude) of the new center location after map has been dragged.

I want to clarify once again, I am not talking about dragging the marker/point, I am talking about dragging the map with touch.

Thanks in advance.

解决方案

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

这篇关于iphone mapkit拖动并获取中心位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆