Reputation: 3366
So, I know how to plot a marker on the map.
I have an event that occurs once that event occurs on the client side I need to stop the marker from being draggable from that point on.
I thought it might be as simple as this. :
marker.setDraggable = false;
From what I can see this is not working, I see that it has the setIcon and several other methods, but not seeing how I can stop draggable.
Any advice/suggestions is greatly appreciated. I have been looking at this for quite some time.
Upvotes: 5
Views: 9388
Reputation: 1891
Marker has a setDraggable
method, so you want marker.setDraggable(false);
https://developers.google.com/maps/documentation/javascript/reference#Marker
Upvotes: 16