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
0 answers

How to apply Google Distance Matrix Service efficiently in React Redux?

I'm fetching list of orders containing delivery vehicle's current location and order's destination and storing list in Redux Store. Currently I've implement distance matrix service in a component and executing it in App.js file and passing each…
0
votes
1 answer

Python Google Map Distance Matrix use only acceptable Zip Codes

I am using the google distance matrix to determine the distance between zips, however, with the nature of the data sometimes there is not a legitimate zip code being passed to the API. Google still returns a distance. For example it was passed…
Josh Pachner
  • 151
  • 6
0
votes
1 answer

Distance Matrix API / java

I have a java program which calculates the distance and the journey time between two locations using the google matrix distance API. when I run my program everything goes fine but after a while I get this error: java.net.SocketTimeoutException:…
user13597413
0
votes
0 answers

listing providers in a given range depending on their actual distance

my objective is layed out on a pic (thought it will be easier ). My curiosity is is, is it how its done in the real world in the sense of mechanism wise. if there are millions of rows in that table wouldn't it take so long to make the…
0
votes
1 answer

Returning a value from distancematrix callback function undefined?

I assume because it is asynchronous. Here is my code: service.getDistanceMatrix( { origins: [yourPosition], destinations: [end], travelMode: 'WALKING', }, callback); function…
user11965730
0
votes
1 answer

Google Distance Matrix API can't find a specific zip code

I am trying to get the distance between zip codes on the client side in JavaScript. The Distance Matrix service has been working great except for one specific zip code: 68434. When I tried performing the request using an ajax request instead it…
0
votes
1 answer

java.lang.NullPointerException exception while reading csv file

I'm trying to calcule the distance and travel time between origins and destinations using the distance matrix API. I used the following code : public class read_csv_file { public static ArrayList getTownList(String fileName) { try { …
user13597413
0
votes
1 answer

Message: Undefined property: stdClass::$distance Google Distance API

I try to solve this error for a few days, but I can't find the solution for the error. I have coordinatstrong texte dataset, I want to get the distance using that coordinate. when I run, it show error Message: Undefined property:…
Ardi
  • 1
0
votes
1 answer

Calculate by road distance between two latitudes and longitudes in react from scratch

So, I am new at react. I am trying to develop an app in react in which i have an array of multiple objects containing different latitude and longitude in each object. I want to calculate the distance by road between two latitudes and longitudes by…
0
votes
1 answer

Google Sheets failing to parse "distance" from Google Distance Matrix API

I am using Google Sheets as a mileage tracker to calculate the distance from my home to various addresses. This formula had been working for me for a few months, but recently…
0
votes
1 answer

Display two different JSON results in one line

I am new to JSON, Google Maps APIs DistanceMatrix & Places I am trying to display results from two different JSON Results Basically both of them come from two different "lists" edit for object_json i am getting all the nearby places from my…
0
votes
1 answer

Google Distance does not work with async await

I am trying to use google-distance package of node to calculate the distance between two cities, and once this distance is stored in a mongodb database, next to other fields from a form. The problem I find is that I don't know how to return the…
0
votes
0 answers

How to get distance from two locations using latitude and longitude

Now i am using google distance matrix API to get distance from one location to another. Is it possible to get the same distance (transport) without using distance matrix API. I was tried the blow code for get the distance using latitude and…
Rahumathulla
  • 73
  • 10
0
votes
1 answer

Gmapsdistance function not accepting departure times

I am attempting to give a series of routes to gmapsdistance function. This has previously worked fine with other routes but is not accepting the departure_time arguments with this combination of lat and long. I have attempted simply entering in a…
RAH
  • 395
  • 2
  • 9
0
votes
0 answers

Google Maps: ReferenceError: google is not defined in cordova android application

I'm trying to create a cordova project that marks some locations in map and getting the distance in between the selected location and current location of the user. I have used cordova-plugin-googlemaps for displaying the google map and used…