Reputation: 37068
I need to trigger an event when the user drops a marker on the map. I have the code working for them to drop the marker, but I can't figure out how to trigger the event.
Any tips?
Upvotes: 19
Views: 11199
Reputation: 1552
With Marker event dragend you have the latlng where the Marker is drop. This is that you need?
google.maps.event.addListener(Marker, "dragend", function(event) {
var lat = event.latLng.lat();
var lng = event.latLng.lng();
});
Upvotes: 48