Klaasvaak Klaasvaak - 27 days ago 15
Android Question

Google Maps Android MapView v2: disable zooming

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);

Answer

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.