I am using Google Directions API to find directions between an origin and a destination, for this case, the origin is a Hotel, while the destination is a metro station.
My code to get directions are
var request = {
origin: start,
destination: end,
travelMode: 'DRIVING'
};
directionsService.route(request, function (result, status) {
if (status == 'OK') {
directionsDisplay.setDirections(result);
}
});
After getting the directions, the map shows direction where no walking is included and the user is shown directions only via "Driving" mode, as here
A sample application to give an idea of the current scenario ....
However, getting directions from same origin to destination in google maps is showing a shorter and different route, which is using driving with some additional walking wherever possible to make the route shorter, as here
It would be great if somebody could help me out in figuring out how one can achieve directions from Point A to Point B with multiple travel modes, for my case "Driving" as well as "Walking" mode to get a shorter route.
Thanks