[GIS] How to get the coordinates from a drag event in the Google Maps API V3

google mapsgoogle-maps-apijavascriptmaps

I have made a Google Version 3 Geocoder , I want to be able to pick up the coordinates of the route when it is dragged. I know how to pick up the coordinates giving the start and end points, but, after change the route, I don't know how to do!

Best Answer

I did this, and it works!

var directionsDisplay = new google.maps.DirectionsRenderer(rendererOptions);
...
google.maps.event.addListener(directionsDisplay, 'directions_changed',         
    function() {
                your code here
    }
);