简体   繁体   English

iPhone:Mapview移动引脚问题

[英]iPhone:Mapview move pin issue

I have Mapview and I successfully plot all pins on map and when I select a pin also add one button which is rightCalloutAccessoryView and when I click on button at that time I want to move all pins and selected pin display in center of mapview so please give me idea to develop this functionality.. 我有Mapview,我成功地绘制了地图上的所有引脚,当我选择一个引脚时,还添加了一个按钮,这是rightCalloutAccessoryView,当我点击按钮时,我想移动所有引脚并选择引脚显示在mapview的中心所以请给我想开发这个功能..

Sorry for bad English. 抱歉英语不好。

Thanks in advance. 提前致谢。

When the button is pushed, calculate the latitude/longitude range of all your pins, make an MKCoordinateRegion based on that, then use the MKMapView 按下按钮时,计算所有引脚的纬度/经度范围,根据它制作MKCoordinateRegion,然后使用MKMapView

- (void)setRegion:(MKCoordinateRegion)region animated:(BOOL)animated

To zoom to that region. 缩放到该区域。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM