

To check whether everything is okay, go to the “ Google Travel Time” custom menu and click “ Run“.Waypoints also should be added as latitude and longitude as comma-separated values.

If you want the travel time across a specific route, you can define it using waypoints). Add waypoints, if necessary (when you provide only the origin and destination, Google will provide the route with the least travel time, this may choose alternate routes depending on the traffic condition.To get the coordinates, zoom in the Google Map completely and right-click in the specific location on the road, and copy the coordinates.Add coordinates of Origin and Destination.This will use to identify each route you defined here in the Outputs sheet. Copy the above Google Sheet to your Google Drive.How to use this Google Sheet to get Travel Time and Distance.įirst make a copy of the following Google sheet to your Google Drive. You can modify this code and get custom results. Then in the second part, I will explain the code attached to this Google Sheet briefly. For this part, you do not need any knowledge of coding. I will explain this in two parts as below.įirst, I will explain to you how to use the Google Sheet given below to collect Google Travel Time Data. How to get Google Map Travel Time and Distance to Google Sheet Automate the Script to retrieve data at predefined intervals.Creating a custom menu to run the Script.How to use this Google Sheet to get Travel Time and Distance.How to get Google Map Travel Time and Distance to Google Sheet.This will generate an API key that you will need in the next step. Go to APIs & Services from the left menu and select Credentials.Ĭlick CREATE CREDENTIALS and select API key. You will need an API key for integrating Google Maps with your app. You will also need the Directions API while drawing the routes. Now, search for Maps and enable Maps SDK for both platforms. Go to APIs & Services from the left menu and select Library. In order to use Google Maps in your app, you will need to enable Maps SDK for both platforms. Go to the Project Selection dialog box and click New Project.Įnter a name for your project and click Create. To create a new GCP project, follow the steps below: NOTE: If you have never used GCP before, you will have to set up a Billing account. You will need a GCP project to get access to the Google Maps API and generate an API key. Keeping team in loop Creating a GCP project
