How do I find the current zoom level when loading or clicking a Google map?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
If you have a map object like this:
var mapObject = new google.maps.Map(document.getElementById("map"), _mapOptions);
use
mapObject.getZoom();
回答2:
Use this code:
float zoomlevel = mMap.getCameraPosition().zoom;