android mapview maximum zoom level only 19

天大地大妈咪最大 提交于 2019-11-28 06:33:23

问题


I created a simple MapActivity on my android and discovered that its MapView can't be zoomed in to more than level 19. The zoom-in button just greys out. Calling the zoomIn() method is also to no effect, the level still stays at 19.

However, when I start the official Google Maps application, exactly the same area of the map successfully zooms in two more levels to 21.

Can anybody advise me on how I can zoom further in my own app? Am I missing setting some parameter explicitly (manifest, mapactivity, mapcontroller)? Really can't find out so far and feel quite confused about it, seeing the difference.

A similar question has been asked recently, but also stays unanswered.


回答1:


The maximum zoom level depends on the area of the map you are in.

You can get the maximum zoom level available by calling #getMaxZoomLevel() in your MapView. That's the closest zoom you will be able to get, no matter what happens in the official Google Maps application.



来源:https://stackoverflow.com/questions/5405453/android-mapview-maximum-zoom-level-only-19

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!