Is it possible to disable/enable multi-touch zoom in GoogleMap API 2? I like to implement it programatically disable or enable when it is necessary. Thanks
Asked
Active
Viewed 346 times
2 Answers
0
Multi touch zooming is typically handled on a system level. You could have a toggle for turning zooming on/off, but not multitouch specifically (to my knowledge).
You should be able to toggle zooming in general with:
disableScrollWheelZoom();
And:
enableScrollWheelZoom();
You could perform a check for user agents (mobile) and disable it by default for those, then give the option to enable it.

Alec Bennett
- 5,457
- 2
- 17
- 18
-
I am using API2 in android but my GoogleMap does not have those APIs. – Bryanyan Apr 28 '13 at 04:04
-
Sorry. I misunderstood. Mine was a pure Google Maps v2 answer. I am not extremely familiar with the Android Maps API, but this answer *might* help... http://stackoverflow.com/questions/4626028/how-to-disable-pinch-in-android-mapview – Alec Bennett Apr 28 '13 at 07:54
0
To Disable the multituch zooming you can use this in the XML
file:
map:uiZoomGestures="true"
you will have to add the map namespace in order to use it like this:
xmlns:map="http://schemas.android.com/apk/res-auto"
in your fragment xml code:
<fragment
xmlns:map="http://schemas.android.com/apk/res-auto"
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
map:uiZoomGestures="true"
same can be done in JAVA
code:
map.getUiSettings().setZoomGesturesEnabled(false);

Emil Adz
- 40,709
- 36
- 140
- 187