Android的图形页面最大缩放级别仅19缩放、图形、级别、页面

2023-09-05 00:55:45 作者:Dream.

我创建了一个简单MapActivity在我的Andr​​oid和发现它的图形页面不能被放大到超过19级变焦式按钮即可变灰。调用zoomIn()方法也没有效果,水平仍停留在19

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.

不过,当我开始在谷歌官方地图应用程序,成功地拉近两个级别21,地图上的完全一样的区域

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

谁能告诉我怎样,我可以进一步在自己的应用程序放大?我缺少明确设置一些参数(清单,mapactivity,mapcontroller)?真的找不到出这么远,觉得挺困惑的是,眼看着差异。

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.

一个类似question最近被问过,但还停留解答。

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

推荐答案

最大变焦水平取决于你在地图上的区域。

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

您可以通过调用获得可用的最大缩放级别 #getMaxZoomLevel()图形页面。这是你就能搞定,无论是在官方的谷歌地图应用程序发生的事情最接近的变焦。

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.