How to get total distance of route with multiple stopovers.

Hello,

I am using Google DistanceMatrix API to get the distance of the route. But  my requirement is to get the distance of a route with multiple stopovers. So for example if my origin is "A" and return to origin is true,

then I want a cumulative distance from "A" to  "B", "B" to "C" and "C" to 'A".

How can I achieve it? what are my options?

Thanks,

Preeti

Preeti Gupta wrote:

Hello,

I am using Google DistanceMatrix API to get the distance of the route. But  my requirement is to get the distance of a route with multiple stopovers. So for example if my origin is "A" and return to origin is true,

then I want a cumulative distance from "A" to  "B", "B" to "C" and "C" to 'A".

How can I achieve it? what are my options?

Thanks,

Preeti

Refer the StackOverflow Solution JS for the Same:

https://stackoverflow.com/questions/12802202/google-maps-api-total-distance-with-waypoints


Thanks,

assif_tiger