[英]How to set Zoom Level in android Map v2 on the basis of Kilometers selected by User?
Try to use this formula: 尝试使用此公式:
zoomLevel = 19 - Math.log(altitudeKm * 5.508);
It is not going to be 100% accurate since map is 2D representation of 3D world. 由于地图是3D世界的2D表示,因此它不会100%准确。 Thus there is no such thing as 'view altitude'.
因此,没有“观察高度”这样的东西。 Anyways I tried to play a bit with it and it looks close enough.
无论如何我试着用它玩一下它看起来足够接近。 :)
:)
Taken from here . 取自这里 。 Bing maps use the same Mercator projection as android map v2, so basic math should be the same
Bing地图使用与android map v2相同的墨卡托投影,因此基本数学应该是相同的
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.