400 questions
1
vote
0
answers
72
views
Connection refused in api google-distancematrix-api
I'm having a "Connection refused" issue with the google-distance matrix-api API when processing a request.
This "connection refused" return is seen in a few requests throughout the ...
1
vote
1
answer
77
views
Distance Matrix of 7,000 points
I need to optimize routes to visit 7,000 points (~700 routes).
Should I calculate a Distance Matrix of size 7000 X 7000 = 49,000,000 options? That means I would receive a Google invoice of ~0.005*49M =...
0
votes
0
answers
57
views
Google API distancematrix returns an empty value
I am developing a PHP application to calculate the distance between 2 locations.
This is the code:
$GOOGLE_API_KEY = <MYAPIKEY>
$wayFrom = urlencode($wayFrom);
$wayTo = urldecode($wayTo);
$url =...
0
votes
1
answer
51
views
On what is the 'recommended' route based that the Google Distance Matrix API returns distance and travel time for?
We offer customers the option of calculating the distance between to Dutch addresses for things like travel expenses. One of the options we offer is the Google Distance Matrix where they enter two ...
-1
votes
1
answer
116
views
Google Maps Distance Matrix API returing empty "destination_addresses" and no distance data
I've got a list of addresses without city or zip, but in the vicinity of another address. The Google Distance Matrix API is generally able to infer the locale of the destination address from that of ...
-1
votes
1
answer
540
views
Google Distance Matrix API for two-wheel
I am trying to get the time it takes to get from place A to place B, using several mode of transportation: four-wheel, two-wheel, bicycle, and walk. I am stumbled upon the google distance matrix API ...
-1
votes
2
answers
203
views
Getting error: "o.map is not a function" when using google maps distance matrix api in Node.js
I'm using the Google Maps API Node Client and calling the distancematrix function, but I'm getting an error that says o.map is not a function.
const {Client} = require("@googlemaps/google-maps-...
0
votes
1
answer
204
views
Google Distance API Invalid Key
I'm just starting to use Google Maps APIs and I'm having some trouble when attempting to send a request via Postman to
[https://maps.googleapis.com/maps/api/distancematrix?<params>&key="...
1
vote
1
answer
83
views
How to pick specific elements from a jsondecode in flutter
I am planning to take distance and time from a JSON list provided by google distance API however I have no idea how to specifically take the elements, here's the code I use to get the json
Future<...
1
vote
1
answer
255
views
Google distance matrix api quota behaves unreliable
I'm talking specifically about the quota of type elements per minute per user. I set this value to 150. The documentation says number of elements is origins x destinations.
This is how I call the api:
...
1
vote
0
answers
137
views
How can you get journey time volatility info from Google Maps Platform APIs?
In the google maps user-facing client, you can get ranges on a route's time (e.g. a planned route from London to Edinburgh shows "typically 6 hr 50 min to 8 hr 50 min, Arrive at about 10:30 PM&...
0
votes
0
answers
150
views
How to parse Distance Matrix in JS to only get the distance and the duration?
I have been trying to only get the distance and duration using the Google Distance Matrix API.
I tried and built and modified as I logically could but nothing.
I even slice the response because I did ...
0
votes
1
answer
379
views
Cities missing in Google Maps API distance matrix
I have been using the Google Maps API's distance matrix. However, this seems to not be working for some cities and I'd need your help to figure out why / what I'm doing wrong.
Here's what I'm typing ...
-2
votes
1
answer
647
views
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 ...
-1
votes
1
answer
956
views
Can we have different distance for single source and destination?
On Monday, August 8, 2022 20:37:30(IST) and Sunday, August 14, 2022 17:02:32(IST), when we called Google Distance Matrix API for following source and destination address combination
origin_addresses: ...
1
vote
1
answer
902
views
Find nearest hospital from latitude and longitude data in python/pandas
Patients often bypass their nearest hospital to go to another hospital for surgery (- many reasons for that).
I have 500,000 patient episodes of patients attending 24 hospitals in the UK.
I want to ...
-1
votes
1
answer
68
views
Issue Regarding GoogleMaps DistanceMatrixApi
There is a glitch in the GoogleMaps DistanceMatrixApi.
For the origin pin code B3H and destination pin code B3J with Travel Mode = DRIVING, the distance returned from the GoogleMaps DistanceMatrixApi ...
-1
votes
1
answer
89
views
Error on using google_distance with mutate
I'm trying to calculate the driving distance between two coordinate locations. Here's my code:
library(tidyverse)
library(googleway)
distances %>%
mutate(distance = google_distance(origins = ...
0
votes
1
answer
140
views
Is region no longer needed for Distance Matrix calls using Python library?
Previously I used the code below to call the distance matrix api using they python package googlemaps. The call worked last year 2021 but this year (2022) I get an error message to say
...
-1
votes
1
answer
775
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
52
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 ...
1
vote
1
answer
258
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
852
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 ...
1
vote
1
answer
73
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....
1
vote
0
answers
60
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
111
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
1
answer
831
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
1
answer
99
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
288
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....
2
votes
4
answers
9k
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
304
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 ...
1
vote
0
answers
840
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
104
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
4k
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
375
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
2
answers
881
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
701
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
1k
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
421
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 ...
1
vote
0
answers
56
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 ...
1
vote
1
answer
2k
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
1k
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
453
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
299
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
482
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
321
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
727
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
281
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
24
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
424
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 ...