问题
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