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

Google Maps Distance Matrix API gives impossibly short duration_in_traffic results and also the results are different than Google Maps

I am making a request to Google Maps Distance Matrix API to get duration_in_traffic data for today's afternoon between two points -Besiktas and Bosphorus Bridge- in Istanbul and I've set the departure time to be 17:00:00 at Mar 06 2018. It returns…
1
vote
0 answers

google maps distance matrix js api vs web call

I am using google maps distance matrix with two methods. The first one is via javascript: service.getDistanceMatrix({ origins : [origin], destinations : s[0], travelMode : google.maps.DirectionsTravelMode.DRIVING, …
1
vote
1 answer

How can i use the features of travel_mode: transit and transit_mode: rail for my android application?

I am developing an application that will show the duration, transit and fares for railway journey but i cant find any way to use the features provided in google directions api for android. how to retrieve the data from the json file? and the mode:…
1
vote
1 answer

duration_in_traffic is not returned in Google Maps

I m trying to execute url query but have no results about duration in traffic. https://maps.googleapis.com/maps/api/distancematrix/json?origins=garching&destinations=hamburg&departure_time=now&api_key=my_api_key The results of query listed below: { …
1
vote
1 answer

Distance matrix is not returning distance for large data

I am trying to return the distance eith google Distance Matrix Service. It returns the distance for 60-100 data. But for large data more than 100, it does not works. What I have done is, var service = new google.maps.DistanceMatrixService(); …
1
vote
0 answers

Google Distance Matrix API is working in my local server, but not working in main server

i need to calculate the distance between two area of UK. That's why i use Google Distance Matrix API. In my local host server its works fine, but when i upload it in the internet, its not working. I already get API key from google, verify my…
Sumon
  • 301
  • 2
  • 4
  • 11
1
vote
1 answer

Error while calculating distance matrix

I'm following this post to calculate distance matrix so this is the code snippet import urllib.request from urllib.parse import quote import urllib.parse import simplejson, urllib import urllib.request orig_coord = 19.12,19.45 dest_coord =…
Domnick
  • 509
  • 8
  • 25
1
vote
0 answers

Google Distance Matrix returning wrong location based on Zip Code

I'm sending the following to get the distance between two zip codes via MS Access. https://maps.googleapis.com/maps/api/distancematrix/xml?origins=74104&destinations=30333&units=imperial&key=****** The response however is giving me the wrong…
1
vote
1 answer

How to track route of user between two locations?

I have two Addresses let say Location A and Location B. And I have series of location between those Location A and Location B. I get those series of locations via Fused location API. and saved them on the server. Now following are my requirements…
1
vote
2 answers

Google Map - Distance Matrix API - result order

Regarding the Google Map - Distance Matrix API. Is the result will be guaranty to be in the same order has the request? If I'm requesting the API to get the distances from one origin to multiple destinations, is the result sort is guaranty to match…
Hugo
  • 2,077
  • 2
  • 28
  • 34
1
vote
2 answers

Where can I get large road distance matrix from?

I need to get real distance matrix (taking roads on board) between 320 locations. I have the information about theirs geographic coordinates. I'd like to use Google Distance Matrix Api but there are limits making my task impossible or if I divided…
1
vote
1 answer

Not able to pass distance variable to another activity using Google Distance Matrix API Android

I have tried work on this for whole day but could find a solution. I am working on a test google map app to learn java. From this activity when button is clicked, it takes user to another activity and I need some values to be passed to next…
Sebastian
  • 286
  • 2
  • 10
1
vote
1 answer

Why distance matrix api returning the status "ZERO_RESULTS" even coordinates are correctly mentioned?

{ "destination_addresses" : [ "14.868924,79.873609" ], "origin_addresses" : [ "14.843799,79.862726" ], "rows" : [ { "elements" : [ { "status" : "ZERO_RESULTS" } ] } ], …
1
vote
1 answer

Is it possible to get current travel time in traffic for a precise route with Google Maps API?

I've had success getting current travel time from location A to location B with API calls -- for example doing something like…
1
vote
3 answers

How to send data with Volley Library?

I've tried in some way but the response is always null, But the data will be sent I checked with toast and as expected I also have used postman to check when the data sent in accordance with the key value then the results are appropriate. this my…