Reputation: 64923
I can't figure out how can I handle Google Maps marker changes.
Ideally, I want to get marker location changes in real-time.
Finally, I've checked the docs and I didn't find an specific event to cover this case.
Upvotes: 0
Views: 1615
Reputation: 1
as found in https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.position_changed you can use the position_changed
event on the marker.
marker.addListener("position_changed", e => {
// Do stuff here
});
Upvotes: 0
Reputation: 64923
This was an easy one:
marker.addListener("dragend", e => {
// Do stuff here
});
Upvotes: 3