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

How to use the Google maps java client library to get distance

Am trying to integrate distance matrix API into a Java spring boot application, I came across the java client created by Google but I can't get my way through it. I tried looking at the tests here but I still can't understand how to use According to…
1
vote
0 answers

Google Maps distance Matrix API returns different distance

I am using google distanceMatrixApi to calculate distance between source and destination. It is however, giving varying results. For eg: Source: [E3B 4R3, CA] Destination: [V5Y 1V4, CA] Sometimes, it is returning 5363860, some other times it is…
Akanksha
  • 181
  • 3
  • 8
1
vote
0 answers

How to calculate route distance from current location to destination point in Android with Array list

I have all latitude and longitude of the route and i store them in Array List . My problem is to calculate distance from current location to destination location not straight line instead of using lat and long list to calculate the total…
1
vote
1 answer

Reading JSON data into a webpage/html form from Google Maps Distance API

I'm very new to Google Maps Distance API. I'm trying to create a form that calculates the distance between two points using long and lat.
1
vote
0 answers

For loop seems to be going beyond the specified limit

I've written Javascript code to loop through an array including information about certain restaurants. When applicable, the loop checks the distance between the user's device and the restaurant, and modifies the restaurant's object in the array to…
1
vote
1 answer

How to find the time it will take to travel between two places in an android app

I am working on a school project and need to calculate the time it will take to travel between two locations preferably with the option to specify the mode of transportation inside of an android app. I have come across the Google Distance Matrix API…
1
vote
1 answer

UTF-8 handling in the Distance Matrix API

I'm trying to write a VBA code that interacts with the Google's Distance Matrix Api, and returns me the distance between two points. The problem is, when I try to use latin letters (like ã), it returns a Invalid Destination error: …
1
vote
1 answer

Is there a simple fix for this Python/ Google OR tools program for Vehicle Routing to make it work as intended?

I am trying to use this python program for vehicle routing using OR tools to create a 'data matrix.' The example program is posted at https://developers.google.com/optimization/routing/vrp It is the full program at the very bottom of the page. …
1
vote
1 answer

Google Maps API Distance Matrix - Delay time to request (client-side) another 100 elements

I have a mini-map project that uses Distance Matrix Google Maps API to create a polyline (route) from start point to end point. I have many markers in my map and I have to connect them using Distance Matrix API to fetch the duration value. The…
1
vote
1 answer

Google Distance Matrix API very slow on Python

I was using the Google Maps Distance matrix API in python to calculate distances on bicycle between two points, using latitude and longitude. I was using a loop to calculate almost 300,000 rows of data for a student project (I am studying Data…
Will F
  • 21
  • 2
1
vote
2 answers

API distance matrix Call in Javascript alone

So I am an extremely beginner programmer trying to understand how to call/get data from Google Distance Matrix API in purely Javascript. Below is my codes https = require('https') function getDistance(app){ console.log('testing1'); let…
1
vote
0 answers

ANDROID DIRECTION AND DISTANCE MATRIX API

I have integrated distance matrix api and direction api of Google Maps. From Direction api, I get distance and time for 3 routes. If I select a route other than best route and then if I call distance matrix api, then it gives distance & time between…
1
vote
1 answer

Cordova plugin for google map distance matrix service

I am trying to develop an android application in cordova. It have to implement some google map functionalities like distance matrix service and direction service. But I haven't find any plugin for these functions. I'm using cordova-plugin-googlemaps…
JESLIN
  • 159
  • 1
  • 2
  • 14
1
vote
1 answer

returned value from a callback function

I am having some trouble while getting the returned value by the callback function ("dist" = undefined).....I've tried to get the value so many times but still undefined. However, I can get it from the console....Please Some Body can…
1
vote
1 answer

How to configure Google Maps Distance Matrix API for Android (java)

I am developing an Android app(java) that can calculate the travel distance of two places given their coordinates. I have a Google Distance Matrix API key with me but I was unable to find a proper way to add the dependency in my Android project. How…
Vizard
  • 149
  • 1
  • 12