iPhone App-MkMapview获取地图视图中可见区域的范围
在ipohne应用程序中使用mapView如何检测mapview中可见区域的范围(我的意思是绑定总区域的经度和纬度范围)
,以及在mapview中应用放大或缩小时,如何收到范围更改的通知手势控制(捏合手势)?
in ipohne app Using mapView how to detect the the range of area visible in mapview (i mean range of longitude and latitude which binds the total area)
and also when applying zoomin or zoomout in mapview, how to get notified that the range is changed with gesture controlled (Pinch gesture)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的 MapView 实例有一个
.region
属性,您可以使用它来查找当前显示的可见区域(即self.mapView.region
)。MKMapViewDelegate
类具有您可以为范围更改实现的事件,但它与捏合无关 - 如果您双击地图(放大),它也会被触发。Your MapView instance has a
.region
property that you can use to find the currently displayed visible area (ie.self.mapView.region
).The
MKMapViewDelegate
class has events you can implement for the range change, but it's not tied to the pinch specifically - it's also fired if you double tap on the map (to zoom in).