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

Distance Matrix results

I am having difficulty putting a DistanceMatrix API result into JSON format. This is the var_dump of the $response (I use Ivory\googlempas plugin in Laravel 5.1) object(Ivory\GoogleMap\Services\DistanceMatrix\DistanceMatrixResponse)#694 (4) {…
-1
votes
1 answer

Why isn't my callback function being evoked when using the Google Distance Matrix Service API

The below code works fine except the callback function is not being evoked. None of the alerts in the callback function are displayed but the Start and End alerts both appear. I've checked the console and Google returns the data you'd expect,…
Michael LB
  • 2,715
  • 4
  • 23
  • 38
-1
votes
3 answers

how to calculate sum of time intervals

Please tell me how can I calculate the sum of time intervals return from google's distance matrix api - for e.g. I am getting 2 days 15 hours or 5 hours 49 mins or 41 mins formate. So how can I sum up all the time intervals. Please see my response…
-1
votes
1 answer

C# How to find the distance between two cities

I want to know how to find the distance between two cities in c# using Google Maps Distance Matrix API https://maps.googleapis.com/maps/api/directions/json?origin=Khouribga&destination=Casablanca But, I don't know how to parse json I want to…
-1
votes
1 answer

select st_distance as 'distance' not working in google fusion table

ST_DISTANCE AS 'distance' not working on below code: var query = "SELECT 'Coordinates' as 'Coordinates', " + "'Lender_Name' as 'Lender_Name', " + "'ZIP_Code' as 'ZIP_Code' , " + "ST_DISTANCE('Coordinates', 'LATLNG(" + lat + " " + long +…
-2
votes
0 answers

Google routes api is not returning `distanceMeters` field

I have this request for google routes api (https://routes.googleapis.com/distanceMatrix/v2:computeRouteMatrix) { "origins": [ { "waypoint": { "location": { "latLng": { …
-2
votes
1 answer

google maps, client libraries node js, distance matrix request js

I am trying to implement a google maps distance matrix api request using, node JS google Client library. specifically @googlemaps/google-maps-services-js The problem am facing, I can only finds source code example for elevation in the…
-2
votes
1 answer

Google Maps Distance Matrix - efficient useage

I'm working on the delivery web app and can't figure out how can I reduce the number of requests app sends to google distance matrix to calculate a distance between requested delivery and store address. I have a page-catalogue that has around 1000…
Maark
  • 1
  • 2
-2
votes
1 answer

Is it possible refresh the value calculation in route segment?

I would like to refresh the route segment after entering the value in combo-box. Refresh the calculation. Html