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.
The initialize() function creates a Google Map with a marker. The transition() and moveMarker() are used to move marker smoothly on click on the Google map.
You need to use the reverse geocoding service (as demonstrated in the example you link to) to retrieve the formatted address.
Marker has a setDraggable
method, so you want marker.setDraggable(false);
https://developers.google.com/maps/documentation/javascript/reference#Marker
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