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
0
votes
1 answer

How to Remove the Access-Control-Allow-Origin error while calling google API Distance Matrix by jQuery

How to Remove the this error has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource while calling google API Distance Matrix by jQuery use this source
Suhad Mendis
  • 51
  • 1
  • 11
0
votes
3 answers

Convert array to pipe separated

How to convert array EX-["lat","long","abc","def","abcc","deef",] into [lat,long | abc,def | abcc,deef] in javascript. I am facing issue with distance matrix Api... Below is my code export async function getStoreDistance(locationDetails) { …
Ankit Kumar
  • 118
  • 12
0
votes
1 answer

Directions API returns different directions compared to google maps

I am using Google Directions API to find directions between an origin and a destination, for this case, the origin is a Hotel, while the destination is a metro station. My code to get directions are var request = { origin: start, …
0
votes
2 answers

"How to get the actual road distance between two places both the points are fixed"

We are creating an Android application and we need to calculate exact road distance between two fixed points. We require road distance not the Arial distance(Bird flying distance). We need to calculate the estimate trip cost before the trip…
0
votes
1 answer

How can I get just the value of the information?

I want to get only the value of the kilometres to save it in a new variable. I also tried to access the array with index. My code: /** * @Route("/routesetting", name="api_routeset_set", methods={"GET"}) */ public function getRouteAction(Request…
Gallab
  • 1
0
votes
1 answer

Returning XY values in Google Distance Matrix

I have some simple code set up to produce drive times from one origin to several destinations using the Google Distance Matrix API. This part seems to be working perfectly fine; my issue is that the destinations come back as addresses rather than…
user11772521
0
votes
1 answer

Gmaps Distance Matrix : How to iterate over sequence of rows in data frame and calculate distance

Please see attached snapshot as I ask my question. I have a data frame with a pair of Latitude / Longitudes that have been geocoded from different program and I am trying to generate a distance matrix between (Latitude1/Longitude1) and…
0
votes
1 answer

Why is google distance matrix API only returning 10 results, when passed 52?

I am trying to get the distance for various addresses from a source address and am able to call the google distance matrix API, but only 10 results are returned instead of a result for each address sent. I am using restsharp library in c#. My…
Chris
  • 968
  • 16
  • 27
0
votes
1 answer

DistanceMatrixApi old release has dependency on licence key?

I am using Google Maps API enterprise key for authentication with Google Maps web services. Upgraded google-maps-services.jar from v0.1.17 to v0.1.18 in the project and got authentication error. DistanceMatrixApiRequest request =…
smile-on
  • 2,073
  • 1
  • 20
  • 20
0
votes
1 answer

Google Distance Matrix API error distance between PARIS and another french city (randow problem)

When i try to calculate the distance between Paris and an other city in France, Google API returns a random result. It returns the right distance or ZERO_RESULTS I use Postman application. I create GET request :…
0
votes
0 answers

How to solve error #value! in Excel, by using webservice formula that use Google Map API Distance Matrix in xml?

Since our purchase of Google Map API Distance Matrix Advanced, we try to use a Webservice formula within Excel 2013, in XML, that would allow us to make several requests to retrieve driving mileage values between different origins to different…
0
votes
0 answers

Google Distance Matrix Api in accurate results

I am implementing google.maps.DistanceMatrixService() When I test I am getting a weird anomaly and it is not consistent. As I am driving towards to destination I am hitting a button that checks my distance. each time I hit the button it shows that…
Jason
  • 1,091
  • 4
  • 19
  • 40
0
votes
1 answer

Prevent Google Distance Matrix Service from using AREA codes

I am working on a core piece of my form functionality that finds the distance between two ZIP codes. It does find the distance accurately, but unfortunately, this Google Distance Matrix API is also searching for existing area codes, which can…
0
votes
2 answers

How to create Cost Distance Matrix using google-distance-matrix?

I know how to get distance between 2 locations using var distance = require("google-distance-matrix"); distance.key('API-KEY'); distance.mode('driving'); distance.units('imperial'); var origins = [platlong.toString()]; var destinations =…
0
votes
0 answers

How do I read Distance Matrix API response in JSON from my app?

String url = "https://maps.googleapis.com/maps/api/distancematrix/json?origins="+expedTextView.getText().toString()+"&destinations="+destTextView.getText().toString()+"&sensor=false&mode=driving&key=AIzaSyC9BT3f2jmmPSJh2ewGfGiuVz1zeIfPX4A"; …