android mapview maximum zoom level only 19

2020-02-13 05:50发布

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条回答
对你真心纯属浪费
2楼-- · 2020-02-13 06:20

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.

查看更多
登录 后发表回答