Google Maps & # 8594; Setting a marker as dragged, do I want it to not be dragged later through client-side logic?

So, I know how to build a marker on a map.

I have an event that occurs when this event occurs on the client side. I need to stop the marker from dragging from this point.

I thought it could be that simple.

marker.setDraggable = false; 

From what I see, this does not work, I see that it has setIcon and several other methods, but does not see how I can stop draggable.

Any advice / suggestions are welcome. I have been looking at this for quite some time.

+4
source share
1 answer

The marker has a setDraggable method, so you want marker.setDraggable(false);

https://developers.google.com/maps/documentation/javascript/reference#Marker

+11
source

All Articles