开发者

iPhone : MapKit and displaying the current Map Scale

开发者 https://www.devze.com 2023-03-22 18:46 出处:网络
I need to display on the map a scale showing how far a inch / cm is for example.This will need to change depending on the zoom level.

I need to display on the map a scale showing how far a inch / cm is for example. This will need to change depending on the zoom level.

My theory is that if I know the length of the map, and the length of the graphic, If I know what the current scale of the map was I could just do some maths to work out the graphic indicator scale.

So is there 开发者_开发问答a way to get the current zoom lvl in meters? Is it linked to the span or something?


The zoom level is linked to the span - you first need to get the span of your map view, and then convert it into meters.

0

精彩评论

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