Obtaining lat, long, travel time, distance and cost from a multi-destination trip using Google API | XM Community
Question

Obtaining lat, long, travel time, distance and cost from a multi-destination trip using Google API

  • 20 November 2019
  • 1 reply
  • 37 views

Hi! I was trying to figure out a way to get lat, long, travel time, distance and transit cost from a multi-destination trip. The user will input the origin and the destination with address or markers and also the mode of travel for each trip. As an output, I'm expecting to have the locations and the travel time and distance of each trip. The code from this link (https://github.com/keita-makino/qualtrics-map) helped me to mark the locations, I don't know how to use the location information and the travel mode choices to the get the respective time, distances and cost information.

I would really appreciate any help or directions on how to reach the desired outcome. Thank you!

1 reply

Userlevel 1
Badge +3
@TAN I suppose this Google Maps Direction API will help you.
You see the api accepts the origins and destinations and then the response contain the duration property.

Leave a Reply