简体   繁体   中英

Mapkit showing annotation region

I have a MKMapView with several annotations. These annotations differ from varios location all over Sweden. What I want to do is to zoom the map so all annotations show.

I do not want to position the map to my position (although I do want to show it), but want all annotations to show and center the map according those locations.

Ie if one annotation would be "kiruna" (upper left sweden) and the otherone would be "stockholm" (middle right sweden), I want the map to show both. If the map would only show "uppsala" (above stockholm) and "stockholm", I want the map zo zoom that "uppsala" is in the top left and "stockholm" bottom middle/right.

How can I do this? I have the lat/lon positions ofcouce for every location.

Regards,
Paul Peelen

重复使用大量材料来解决您的问题: 定位MKMapView一次显示多个注释

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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