android mapview最大缩放级别只有19
我在我的 Android 上创建了一个简单的 MapActivity,发现它的 MapView 无法放大到超过 19 级。放大按钮只是变灰。调用zoomIn()方法也没有效果,级别仍然停留在19。
但是,当我启动官方Google地图应用程序时,地图的完全相同的区域成功地再放大了两个级别到21。
任何人都可以告诉我关于如何进一步放大我自己的应用程序?我是否缺少显式设置某些参数(清单、mapactivity、mapcontroller)?到目前为止还真的找不到答案,看到差异后感到很困惑。
最近有人提出了类似的问题,但也没有得到答复。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最大缩放级别取决于您所在的地图区域。
您可以通过在
MapView
中调用#getMaxZoomLevel()
来获取可用的最大缩放级别。无论官方 Google 地图应用程序发生什么情况,这都是您可以获得的最接近的缩放比例。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 yourMapView
. That's the closest zoom you will be able to get, no matter what happens in the official Google Maps application.