Questions tagged [google-distancematrix-api]

The Google Distance Matrix API is a service that provides travel distance and time for a matrix of origins and destinations

The Google Distance Matrix API is a service that provides travel distance and time for a matrix of origins and destinations. The information returned is based on the recommended route between start and end points, as calculated by the Google Maps API, and consists of rows containing duration and distance values for each pair.

This service does not return detailed route information. Route information can be obtained by passing the desired single origin and destination to the Directions API.

Official Documentation

395 questions
1
vote
1 answer

Calculating distance with google distance matrix API working well on just about all queries besides a select few

I made a distance calculator between zipcodes in the US that utilizes the google distance matrix api and I figured out how to get it work for just about all locations but places like Key West FL zip code 33040 do not seem to work. At first many…
1
vote
2 answers

Travel time based on arrival time (Using Google Spreadsheet) - Function

The main requirement is to find travel time with traffic data between two locations or zip-code. Inputs parameters would be from Location, destination, arrival time(this is between 6AM 8AM), mode of transportation, traffic model Based on the above…
1
vote
1 answer

"SyntaxError: Unexpected token ':'. Parse error." JSON & ajax

I'm trying to use google maps api with distance matrix api, i'm getting the routes along with distance and time in json format. an example of the link i'm getting data…
1
vote
0 answers

Google maps distance matrix has similar duration values with or without departure time

python googlemaps.Client.distance_matrix returns a quite similar results with and without departure_time. In my project, We are running the googlemaps.Client.distance_matrix function with and without departure time. Our main goal is see the…
1
vote
2 answers

Gmapsdistance package in R error "You must use an API key to authenticate each request to Google Maps Platform APIs."

Have an R script to run a bunch of different points for commute time and distance. Have a google API key with an enabled billing account, go to run and get shut down at line 262 every time. Tried restructuring the code. Refreshed the API Set the…
1
vote
1 answer

Need a custom function to repeat for each row shown and minimize API calls

EDIT: I need help combining functions into 1 and adding a trigger. In my spreadsheet I have rows 4-100 for customer service calls that are filtered from a "ServiceData" worksheet by either choosing a "Service Month" or "Service Day" (ie. "7/11"…
1
vote
1 answer

Google distance matrix doesn't contain village

I wrote a function that gets an input containing the name of a city/village. Now it seems that the Google API directions matrix does not recognize one of the values given. Does anyone know how to get results anyway? If I type in the village name…
1
vote
1 answer

Different response using address versus coordinates

We are using Google distance matrix api and getting different response when using address versus coordinates for the exact same address. When using address we don't get any information about the borough/postal town, we only get the municipality…
1
vote
1 answer

Java streams, wait for Google distance matrix to return result

I have a list of vehicles that I need to calculate the total fuel used per vehicle. I am using Java streams to loop through the list, get a vehicle, calculate its distance using the Google distance matrix api, use the distance to calculate fuel…
Astonio
  • 635
  • 2
  • 8
  • 21
1
vote
1 answer

Calculating a 2d distance matrix from a Google DistanceMatrix response in Java

I am trying to solve the Travelling Salesman Problem and Vehicle routing problem with the Google Or tools library, in the tutorial found here, they use a distance Matrix whose i, j entry is the distance from location i to location j in miles, where…
Astonio
  • 635
  • 2
  • 8
  • 21
1
vote
1 answer

Google Distance Matrix Not Returning Rail Results for East Asian Cities

I'm building a tool to understand levels of transport connectivity between major cities in 'global mega-regions'. It's pretty straightforward - we enter a bunch of cities into Googles distance matrix and Google in turn tells us transit times. The…
1
vote
1 answer

Google Maps API; "CORS header ‘Access-Control-Allow-Origin’ missing" error

I'm trying to calculate the estimated travel time between two places, with the Google Maps API. I am asking for the data in the following way: const Url =…
1
vote
1 answer

Error Converting Googleway outport to Dataframe

I have been utilizing code from the answer of a previous question with great success. Last night, after successfully using the code many times I started to receive an error when trying to execute the second part of the code to access list results.…
Rho
  • 21
  • 2
1
vote
1 answer

Can i get all the data from google distance matrix api in one HTTP request?

I am using google distance matrix api to get the driving time between 2 coordinates. This is my method for getting the data: private void testDistanceApi(String url) throws IOException { OkHttpClient client = new OkHttpClient(); Request…
Tamir Abutbul
  • 7,301
  • 7
  • 25
  • 53
1
vote
1 answer

Google Distance Matrix vs Directions API

I need to show a route from point A to point B on my android app using google maps. Currently my app just showing distance and travel time from DistanceMatrix API. Now I want to visually show the whole route on the map. The question is should I use…
Marcin
  • 1,113
  • 1
  • 11
  • 33