当太小时,捏合缩放在 MapView 中不起作用
所以我设置了一个 MapView 并启用了缩放控件。当地图跨越整个屏幕(不同的活动)时,它支持捏合缩放就可以了。
在另一个活动中,我显示了一个相当小的地图,我注意到捏合缩放在那里不起作用(只有缩放图标)。
我玩了一下,注意到一旦地图小于屏幕宽度的一半(大约......)捏缩放就会停止工作。我猜想这是 MapView 的一个功能,因为当视图太小时,捏合缩放没有意义。
我在任何地方都找不到这个记录,也找不到一种方法来强制保持捏合缩放启用,即使视图相当小......
So i set up a MapView and enabled zoom controls. When the map spans the whole screen (different Activity) it supports pinch to zoom just fine.
On Another Activity i display a rather small map and i noticed that pinch to zoom doesn't work there (only the zoom icons).
I played around a bit and noticed that once the map is smaller than half of the screen-width (round about..) pinch to zoom stops working. I guess that this is a feature of MapView, as pinch to zoom doesn't make sense when the view is to small.
I couldn't find this documented anywhere and couldn't find a way to force keeping pinch to zoom enabled, even if the view is rather small...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也有同样的问题。在大标题和小地图的屏幕上,多点触控不起作用(或以错误的方式工作)。我注意到大页脚和小地图一切都很完美!为了解决这个问题,我使用全屏地图和相对布局来添加覆盖地图的必要 ui 组件。
I had the same problem. On screens with big header and small map multitouch doesnt work (or work in incorrect way). I noticed that with big footer and small map everything works perfectly! To solve the problem I used full screen map and Relative layout to add necessary ui components covering the map.