You want to first set the marker's draggable
property to true
in the marker options.
Then listen for the dragend
event on the marker - you can set this up with google.maps.event.addListener(marker, 'dragend', callback);
.
Then in your callback
function, get the marker's position using the getPosition()
method.
As mentioned by @geocodezip refer to the API documention for more reference.