I want to draw a polyline on the maps. i am not using the Drawing lib from google maps api.. i have written my own..
problem: Before starting the line draw i disabled the double click zoom as below
map.setOptions({disableDoubleClickZoom: false });
double click event is added to line end. after this event i am enabled by calling the
map.setOptions({disableDoubleClickZoom: true });
but still the zoom is happening.
even if i put the stop event code in double click.
mouseEvent.stop();
Show activity on this post. 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.
The Zoom control displays "+" and "-" buttons for changing the zoom level of the map. This control appears by default in the bottom right corner of the map.
You can change the zoom level of the map using simple steps. Step 1 Go to Add or Edit Map page . Step 2 Select 'Default zoom level' in the 'Map Information section'. Step 3 click save map and see the changes.
The Maps API provides built-in zoom controls that appear in the bottom right hand corner of the map. These are disabled by default, but can be enabled by calling UiSettings. setZoomControlsEnabled(true) .
It should be the other way around:
To disable
map.setOptions({disableDoubleClickZoom: true });
To enable
map.setOptions({disableDoubleClickZoom: false });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With