谷歌地图Android的图形页面V2:禁用变焦 [英] Google Maps Android MapView v2: disable zooming
本文介绍了谷歌地图Android的图形页面V2:禁用变焦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有一种方法来禁用的 MapView的缩放(捏和双击)
但保持滚动?
这意味着可点击设置为false,是行不通的。
我也试图在活动设置了
,但它不会触发使用: onTouch监听器
mapView.setOnTouchListener(本);
解决方案
您可以使用 XML分配这些属性
文件:
图:uiRotateGestures =真
图:uiScrollGestures =真
图:uiTiltGestures =真
图:uiZoomGestures =真
所以使用:
图:uiZoomGestures =假
在 MapFragment
对象。
Is there a way to disable the zooming (pinch and double tap) in the MapView
but keep the scrolling?
This means setting clickable to false would not work.
I have also tried setting an onTouch listener
in the activity
but it will not trigger using:
mapView.setOnTouchListener(this);
解决方案
You can assign those properties using the XML
file:
map:uiRotateGestures="true"
map:uiScrollGestures="true"
map:uiTiltGestures="true"
map:uiZoomGestures="true"
So use:
map:uiZoomGestures="false"
On the MapFragment
object.
这篇关于谷歌地图Android的图形页面V2:禁用变焦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文