How to update the latitude and longitude values by dragging the droped pin in the google map?

Hi, I am new to google maps. I want a functionality like, on the page it has to display the map with perticular latitude and longitude values, which I already entered and there has to be a marker in the map and the map has to be draggable and by dragging it has to display the dragged location's latitude and longitude. And my old latitude and longitude values should be replaced by the new values.  Can anyone plz help me to solve this....   Thanks, Venkat.
1 answers

As a starting point, you could take a look here. Based on Chris' answer, I managed to get it working in Mendix 5 with an onclick event. Looking here it seems like you would need to set the isDraggable property of the marker to true and add the JavaScript to the event when the marker is not being dragged anymore.