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
393
questions
0
votes
0
answers
12
views
Using google maps distance matrix API - javascript
I am trying to run teh example from here: "https://jsfiddle.net/3b03m5mt/"
Apparently, works when refreshing the page.
Using this code only in a project that I've created returns - "...
-2
votes
0
answers
13
views
Best way to determine similarity between two rides route
I am trying to find if two rides have similar route using google api.
and my solution is by comparing distance between "trip A" and "trip B combined with trip A" and compare the ...
-2
votes
1
answer
23
views
Unable to set mode for google maps distance matrix
I'm following this guide: https://developers.google.com/maps/documentation/distance-matrix/distance-matrix
And this request works fine for me:
$ curl -L -X GET 'https://maps.googleapis.com/maps/api/...
0
votes
0
answers
27
views
I am getting really long wait times getting results using googles distance matrix
I am building a small project to help find locations to a user and give the distance between the two. I found some code using the distancematrix that works like a charm, that is until I started ...
-2
votes
0
answers
13
views
Distance MAtrix API : No Route Found
I need help!
i have a react native app and it uses various google maps API including "Distance MAtrix API".
the api itself is enabled on my gcp nd I have checked code over and over.... it ...
1
vote
0
answers
30
views
Need to loop through Google Distance Matrix JSON Object Response
Okay, so i have a list of businesses each with it's own div created via DOM (document.create(div)) blah blah blah
div business 1. 12 miles (only shows on first div)
div business 2
div business 3
etc.
...
0
votes
0
answers
10
views
Google-distancematrix-api not calculating distance for my country
I'm using google-distance_matrix in my web app to calculate distance and prices. The code seems to be working fine if I'm using counties other than my own country (Zimbabwe ). For example from ...
0
votes
0
answers
13
views
Can I use google distance API to caculate distance between a zipcode to a location(location name)?
Does anybody know if it is possible to use google distance API to get a distance value between a location name and a zipcode?
I know it can be done for 2 locations or 2 zipcodes. I am not sure if it ...
0
votes
0
answers
192
views
TypeError: Cannot read properties of undefined (reading 'maps')
I am trying to use the DistanceMatrixService from @react-google-maps/api. One of the required parameters is the 'travelMode'. However, when I tried setting 'travelMode' to 'DRIVING', it shows the ...
0
votes
0
answers
24
views
gmapsdistance report "1: StartTag: invalid element name" for some data point
I tried to use gmapsdistance to calculate the driving time between origin and destination in R. Both origin and destination adopt coordinates (latitude and longitude). The code looks like this:
...
1
vote
0
answers
36
views
Quantifying the distance using Google_distance r function
I'm trying to quantify the distance between localities, applying the Google_distance r function. I have run the examples of the Google_distance function, but the distance between localities is missing....
0
votes
0
answers
38
views
Google Distance Matrix API - Usage in Python client
We are using Google Maps API - Distance Matrix API.
We have imported googlemaps in code and added the key and then tried the Distance Matrix API with the two basic parameters - Origin list and ...
1
vote
0
answers
24
views
One-To-Many travel time calculation and export
I have an excel document with every Australian postcode including LONG and LAT coordinates for each.
What I need to be able to do is get the travel time from one location in Aus to each of the ...
0
votes
1
answer
21
views
DistanceMatrixApi using multiple destination lat/lon points
I'm using the client api specification code that was created from their openapi-specifcation located here https://github.com/googlemaps/openapi-specification/releases. (version v1.17.6) I created all ...
0
votes
0
answers
114
views
How to add a custom overlay/label on google map polyline in Flutter
In Flutter I have Google map and drawing polyline on it, I need to show distance and duration between 2 points on the line.
There are lots of information about google maps and polyline but I couldn't ...
0
votes
1
answer
139
views
How to make a distance matrix for traveling salesman problem using most cost effective way?
We are trying find the optimum route for given sets of addresses. Here optimum route meanibg going every address using shortest distance, We are using Traveling salesman approach to solve this, the ...
0
votes
0
answers
68
views
struct for parsing google distance json in swif
This is the json output from https://maps.googleapis.com/maps/api/distancematrix/json?origins=rijssen&destinations=almelo&mode=driving&language=en&key=
{ "destination_addresses&...
1
vote
0
answers
38
views
How to enable Distance Matrix API ( Google API ) by restricting access from Android App?
Am using google's distance matric API in my Android Application
https://maps.googleapis.com/maps/api/distancematrix/json?origins=10.016029902612894%2C76.40124697219122&destinations=10....
0
votes
2
answers
610
views
How can I use Google Map's distance matrix API in flutter. Can anyone help me
I am making my final year project and I am stuck in distance matrix. I am making an app in which I am using google maps, but I don't know how to find the time and distance between two places. I read ...
0
votes
1
answer
41
views
Configuring Google API Key Restrictions
I have attempted to configure Google API restrictions for the Distance Matrix API. I am using this API from my personal computer only at this time. Eventually, I may also call this from an AWS EC2 ...
0
votes
0
answers
132
views
Google Distance Matrix vs Google Maps vs Direction Service Difference
I am working on the application where I need to calculate the distance between 2 points on road. I am trying to make use of the Google API's to find the same.
However, I am seeing the difference in ...
0
votes
0
answers
314
views
Google Map`s Distance matrix Routine in python
I want to use Distance Matrix routine in Google Map API so I found this Article, explaining how to do it https://medium.com/how-to-use-google-distance-matrix-api-in-python/how-to-use-google-distance-...
0
votes
0
answers
49
views
Finding min geofence radius from a given lat-lng
I have a lat-lng of a location. I want to create a geofence (min radius) around that lat-lng such that the radius of geofence should be just big enough to the nearest road. Say for ex: I am inside a ...
3
votes
1
answer
783
views
How to create a vehicle route optimization problem using or-tools and google-distance matrix while nullifying the end location only?
I am trying to create a vehicle routing problem for multi-drivers with pickup and drop-off locations. The starting point for each driver is their current location and the ending point would be ...
0
votes
1
answer
89
views
how can i find or send shortest path to drawing route google distance matrix api?
I want to draw a route without traffic calculation. I try distance matrix service but ı can't find solution so when the response back from distance matrix service ı want to compare the routes and send ...
0
votes
1
answer
108
views
Invalid 'departure_time' parameter when using Google distance matrix api
I want to calculate the drive time using the distance matrix API - while doing so I need to calculate the drive time at specific times of the day and therefore I'm using the departure_time parameter. ...
-1
votes
1
answer
166
views
Google Distance Matrix - parse response and insert in html element - javascript
Scenario:
I get a list of business places from DB and it looks like this
<div class="list-items">
....
<div id="distance" data-distance="<?= $placeid; ?>&...
0
votes
0
answers
118
views
travel time from google maps API does not vary with time of day
I used gmapdistance to calculate travel time between two points in New York at different times. Can someone please tell me why is the travel time same and is not varying with time of day?
library(...
0
votes
0
answers
98
views
Google Map Distance Matrix units not showing correctly
The below doc says by default the units will show based on the origin. https://developers.google.com/maps/documentation/distance-matrix/overview#units
I am testing with two addresses both in USA. I am ...
0
votes
0
answers
57
views
Google Distance Matrix Api - strange problem when units=imperial
I've been using google distance matrix api for a few weeks now and it has worked great for me.
Now I have to get the requests in miles instead of km, and discover something strange:
The ratio of ...
1
vote
0
answers
31
views
Google Maps Distance Matrix Traffic Assumptions
I am trying to figure out exactly how the distance matrix API processes traffic for driving. Currently, I am using the advanced version of the API by specifying a date and time of departure. I use the ...
0
votes
0
answers
115
views
How to batch a dataframe for Google Distance Matrix API request, using R?
I have a dataframe with ~6,000 records and would like to obtain the distance and driving time from a single UK postcode to the home postcode of each record.
Using the gmapsdistance package and ...
0
votes
1
answer
387
views
Using distance matrix to calculate distance between points with latitude and longitude in Python
I am trying to calculate the distances between points by using gmaps.distance_matrix() with a google api. The code outputs unreasonable results, but I can't find where the error is.
Here is my code:
...
-1
votes
1
answer
267
views
How do I access access the value for "distance" in a Google Distance API JSON payload? (Getting KeyError)
I'm new to using the Google Distance Matrix API, and I keep getting the following error "KeyError: 'distance'" instead of the value for the distance. All solutions to similar problems seem ...
0
votes
1
answer
93
views
How To use DistanceMatrix Api in Spring boot Application
I have a requirement to use DestanceMatrix API to calculate the distance between origin to destination.
can anyone help me to implement this functionality in the spring boot Application?
Thanks in ...
0
votes
0
answers
73
views
how to pass multiple path points in google distance matrix api using javascript
Hello I want to pass multiple path points in google distance matrix API
Currently i am passing this
"https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins="+...
0
votes
1
answer
284
views
Uncaught TypeError: Cannot read property 'apply' of undefined when trying to find distance matrix Javascript
Im trying to find the distance matrix between two points in Google Maps API and im getting this error.
Uncaught TypeError: Cannot read property 'apply' of undefined
at distance_matrix.js:4
at Ku.j (...
-1
votes
1
answer
112
views
Google Distance Matrix API or Google Directions API returning ZERO_RESULTS for two locations from different continents
When searching for distances between two locations from different continents, API is returning ZERO_RESULTS
1.Origin: Otawistraße 40, 13351 Berlin, Germany - place_id ChIJDRnPKt9TqEcRYwjmKskH6gM
2. ...
2
votes
1
answer
344
views
Issue with Google Distance Matrix URL while making off-browser requests
https://maps.googleapis.com/maps/api/distancematrix/json?units=metric&origins=Neuh%C3%B6fer+Damm+110,Germany&destinations=Vogelweide+8,Hamburg&key=YOUR_API_KEY
The API Key is having the ...
2
votes
1
answer
138
views
How to get distance between two locations using Google Distance Matrix [duplicate]
<html>
<body>
<form action="" method="post">
<label>Origin:</label> <input type="text" name="o" ...
0
votes
0
answers
23
views
How do I return values from google.maps.DistanceMatrixService()? [duplicate]
Problem:
I've tried as many ways as I know how and I'm still struggling to return values from googles DistanceMatrixService.
What I am trying to do is create a function that takes in an object:
{
id:...
0
votes
1
answer
248
views
urllib.error.HTTPError: HTTP Error 404: Not Found using Google Matrix API [closed]
I am trying simply to get the distance matrix data but the url just seems not to be working.
This is my code, I obviously didn't place the key but that's not the problem
import urllib.request
import ...
1
vote
0
answers
78
views
Am I returning my current location correctly? [duplicate]
When I enter coordnates manualy, my returning JSON is correct:
{
"destination_addresses" : [ "Warsaw, Poland" ],
"origin_addresses" : [ "Modra 36, 71-220 Szczecin, Poland" ],
"rows" : [
...
0
votes
1
answer
280
views
Google API | Distance Matrix
I need help with my code.
First, is my approach correct that I use the GoogleDistanceMatrix to get the real route distance and not just the linear distance?
I want to use an Geocoordinate for the ...
0
votes
0
answers
28
views
How to show message that if user lat long is outside 200 meters from specific location lat long using google matrix api
I am capturing users current location lat long and comparing it with specific location lat long(location lat long stored in db) and comparing both, if user lat long is more than 200 meters show ...
0
votes
1
answer
307
views
How to send multiple origins, each origin having its own multiple destinations, to Google Distance Matrix on the query-string
I am working with C# WebClient and the UriBuilder class, communicating with the Google Distance Matrix API. My program is sending comma-separated latitude,longitude pairs. Things are working properly ...
-2
votes
1
answer
405
views
Google Maps Distance Matrix - efficient useage [duplicate]
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 ...
0
votes
0
answers
147
views
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 ...
1
vote
1
answer
556
views
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 ...
2
votes
1
answer
6k
views
How do I use Distance Matrix API in ReactJS using @react-google-maps/api?
I am using the above package and I can't find proper documentation to implement the code. Currently, this is my code:
import React, { Component } from "react";
import { GoogleMap, ...