Is there way to create a direct link for only the duration data of a driving route?
I'm attempting to use the times for numerous routes simultaneously, to update based on current driving conditions, but I don't know if there's a way to obtain ONLY the drive-time/duration data from a route.
I'm dealing with too many routes to keep looking the individual maps up.
I don't care which source it is, as long as it:
- updates for real-world/current driving conditions (as opposed to only "normal" for that time of day)
- is free (or CHEAP)
Best Answer
Use Google Sheets with a custom function (GOOGLEMAPS).
There are many precedents on the net but I can't find a specific example of travel time on webapps so I've used this script from Chicago Computer Classes (they have a YouTube video and a link to their script)
The formula in cell C2 is:
=GOOGLEMAPS(A2,B2,"hours")
The formula in cell D2 is:
=GOOGLEMAPS(A2,B2,"minutes")
Their custom formula provides options for "Minutes" or "Hours". I've shown both options. I also converted this to "Hours: Minutes" using this formula in Column E
=concatenate(TEXT(Floor(C2),"0"),"h ",TEXT(round((C2-Floor(C2))*60),"0"), "m")
Note: there is a quota limit on
Google Map Direction query
of 1,000/day for free GSuite accounts.