iphone mapkit拖动并获取中心位置

编程入门 行业动态 更新时间:2024-10-17 09:49:36
本文介绍了iphone mapkit拖动并获取中心位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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

预先感谢。

解决方案寻找 theMapView.region.center 或 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拖动并获取中心位置

本文发布于:2023-10-08 01:20:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1471096.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:拖动   位置   中心   iphone   mapkit

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!