akexorcist / GoogleDirectionLibrary

[Android] Library for Google Direction API for Google Maps Android API v2
Apache License 2.0
571 stars 174 forks source link

How to get Duration #55

Closed mahesh517 closed 4 years ago

mahesh517 commented 6 years ago

Hi, If i have waypoints means how to get duration between all locations

akexorcist commented 4 years ago

I added the total distance and duration in Route. https://github.com/akexorcist/Android-GoogleDirectionLibrary/commit/fa42e57d6ace382f3362931788a5598977ab9ba1

So you can get the total duration in seconds in the route.

Route route = ...
long totalDuration = route.getTotalDuration()