disable zooming dragging in Google maps by clicking on a button

You can use the setOptions() method on the map object:

map.setOptions({draggable: false, zoomControl: false, scrollwheel: false, disableDoubleClickZoom: true});

If this doesn’t prevent zooming, you could always set the minimum and maximum zoom to the current zoom level.

There is also the disableDefaultUI option, which probably takes all of these events into account, but it might disable clicking on existing elements.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)