开发者

Mapkit showing annotation region

开发者 https://www.devze.com 2023-01-15 02:09 出处:网络
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 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.

I.e. if one annotation would be "kiruna" (upper left sweden) and the otherone would be "stockholm" (middle right s开发者_JAVA百科weden), 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


Dupe with plenty of material to solve your problem: Positioning MKMapView to show multiple annotations at once

0

精彩评论

暂无评论...
验证码 换一张
取 消