You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.
With GMapsAPI i can do this with that way:
directionsService.route(request, function(response, status) {
if (status == google.maps.DirectionsStatus.OK) {
directionsDisplay.setDirections(response);
var legs = response.routes[0].legs;
var totalDistance = legs[0].distance.value;
var METERS_TO_MILES = 0.000621371192;
alert((Math.round( totalDistance * METERS_TO_MILES * 10 ) / 10)+' miles');
}
});
The text was updated successfully, but these errors were encountered:
With GMapsAPI i can do this with that way:
directionsService.route(request, function(response, status) {
if (status == google.maps.DirectionsStatus.OK) {
directionsDisplay.setDirections(response);
var legs = response.routes[0].legs;
var totalDistance = legs[0].distance.value;
var METERS_TO_MILES = 0.000621371192;
alert((Math.round( totalDistance * METERS_TO_MILES * 10 ) / 10)+' miles');
}
});
The text was updated successfully, but these errors were encountered: