Android Google Maps: disable dragging in MapFragment

Mahe picture Mahe · Jun 7, 2013 · Viewed 34.3k times · Source

Can I disable drag functionality when the user tries to drag the map with his fingers without disturbing the Zoom in and Zoom out?

Any one please suggest an idea of doing this! Thanks for your Precious help!!

Answer

madhu527 picture madhu527 · Dec 23, 2014

You can disable dragging in MapFragment using:

googleMap.getUiSettings().setScrollGesturesEnabled(false);