I need to add listeners for directions markers, but haven't any access. How can I get access to direction markers like simple markers? Sorry for my terrible English, I hope you can understand me.
UPD: I create a new route:
var request = {
origin: someorigin,
destination: somedestination,
travelMode: google.maps.DirectionsTravelMode.DRIVING
};
directionsService.route(request, function(response, status){
if (status == google.maps.DirectionsStatus.OK){
directionsDisplay.setDirections(response);
}
});
And now I want to get access to the origin and destination markers.