0

On our website we we plot two points on a map, and the google direction api neatly gives us the traveling time. If we change the from or to address some new calculation are performed, and the new traveling time is displayed on the site.

We are trying to create the same kind of setup in Android, but I see that there is no support for the directions API. I have looked at some old examples like this one Drawing a line/path on Google Maps but here there is just a simple line between two points. I do not see anything about the traveling times.

Another question I stumbled uppon was the following Directions API on Android but I do not see how the connection is made between the Android Maps API and the Google maps direction API.

Community
  • 1
  • 1
Saif Bechan
  • 16,551
  • 23
  • 83
  • 125

1 Answers1

0

To draw path you can use this library

Through this library you can get travel duration between two point. now when you move to your destination location you have to calculate your speed and remaining destination distance. from your speed you can assume you destination reach time.

To calculate your moving speed this link will help you

J.D.
  • 1,401
  • 1
  • 12
  • 21