is it possible to disable the move inside of a google mal (v3) for the time i drag a marker?
I don’t want to use i.e. the static map. I need the generall function of movement, but for the moment I drag a marker, the map should not move.
Thanks a lot!
Markers have dragstart and dragend events. On
dragstart, disable the “movement” functionality on the Map by setting various MapOptions tofalse, likedraggable,scrollwheel, etc. Ondragend, set the MapOptions back totrue.Here is a function you can use to disable or enable map movement based on a boolean. It assumes your Map variable is
map.And then you use this in your events like this (
markeris your Marker variable):