I have a map which calculates with this method of google directionsService.route, with that method a response is returned. I just want to be able to get the time calculated by google.
var directionsDisplay = new google.maps.DirectionsRenderer();
var directionsService = new google.maps.DirectionsService();
var request = {
origin:{lat:latitudUsuario,lng:longitudUsuario},
destination: {lat:9.95,lng:-67.39},
travelMode: google.maps.DirectionsTravelMode['DRIVING'],
unitSystem: google.maps.DirectionsUnitSystem['METRIC'],
provideRouteAlternatives: true
};
directionsService.route(request, function(response, status) {
if (status == google.maps.DirectionsStatus.OK) {
directionsDisplay.setMap(map);
directionsDisplay.setDirections(response);
}else{
alert("No existen rutas entre ambos puntos");
}
});