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

Filter by
Sorted by
Tagged with
1 vote
0 answers
50 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<...
Flutter Beginner's user avatar
1 vote
1 answer
89 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: ...
Wipster's user avatar
  • 1,480
1 vote
0 answers
76 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&...
Spycho's user avatar
  • 7,660
0 votes
0 answers
75 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 ...
John Christ BOUMA's user avatar
0 votes
1 answer
173 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 ...
Thomas Gonda's user avatar
-2 votes
1 answer
190 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 ...
Abdallah Mushi Nourdin's user avatar
-1 votes
1 answer
278 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: ...
Sagar Viradiya's user avatar
0 votes
1 answer
233 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 ...
capnahab's user avatar
  • 343
-1 votes
1 answer
33 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 ...
Piyush Gupta's user avatar
-1 votes
1 answer
82 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 = ...
Umair Shariff's user avatar
0 votes
1 answer
95 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 ...
mobcdi's user avatar
  • 1,532
-1 votes
1 answer
392 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/...
Sam Houston's user avatar
  • 3,357
0 votes
0 answers
38 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 ...
Dr5056732's user avatar
1 vote
1 answer
172 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. ...
BERRY's user avatar
  • 27
0 votes
0 answers
609 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 ...
nicole's user avatar
  • 1
1 vote
1 answer
56 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....
Jose's user avatar
  • 11
1 vote
0 answers
35 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 ...
Nick Jones's user avatar
0 votes
1 answer
77 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 ...
Christopher Grimaldi's user avatar
0 votes
1 answer
498 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 ...
Aninda's user avatar
  • 97
0 votes
0 answers
79 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&...
Marcel's user avatar
  • 31
1 vote
0 answers
142 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....
Bincy Baby's user avatar
  • 3,753
2 votes
4 answers
4k 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 ...
Asha -'s user avatar
  • 21
0 votes
1 answer
192 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 ...
DeepBlueSigma's user avatar
1 vote
0 answers
428 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 ...
Anup's user avatar
  • 73
0 votes
0 answers
88 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 ...
Keerthi Prasad's user avatar
3 votes
1 answer
3k 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 ...
Rawan G's user avatar
  • 31
0 votes
1 answer
247 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 ...
Hasan Kirtil's user avatar
0 votes
2 answers
368 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. ...
Chipmunk_da's user avatar
-1 votes
1 answer
470 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; ?>&...
Alexandr Misiyuk's user avatar
0 votes
0 answers
442 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(...
SiH's user avatar
  • 1,346
0 votes
0 answers
191 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 ...
Sowmyan Soman's user avatar
1 vote
0 answers
40 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 ...
Trevor Larner's user avatar
0 votes
1 answer
1k 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: ...
Wu Kris's user avatar
  • 77
-1 votes
1 answer
929 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 ...
BDC333's user avatar
  • 1
0 votes
1 answer
248 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 ...
YoBuss's user avatar
  • 39
0 votes
0 answers
210 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="+...
Hirdesh Singh's user avatar
0 votes
1 answer
409 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 (...
TheKicklighter's user avatar
-1 votes
1 answer
194 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. ...
sam's user avatar
  • 37
2 votes
1 answer
608 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 ...
Lina Stormwing's user avatar
2 votes
1 answer
224 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" ...
Susan's user avatar
  • 45
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:...
Oli Kritzler's user avatar
0 votes
1 answer
343 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 ...
Javier Arevalo Lopez's user avatar
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" : [ ...
Piotr Zaremba's user avatar
0 votes
1 answer
489 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 ...
PabloS's user avatar
  • 81
0 votes
0 answers
39 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 ...
user_1234's user avatar
  • 621
0 votes
1 answer
810 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 ...
Tim's user avatar
  • 8,569
-2 votes
1 answer
623 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 ...
Maark's user avatar
  • 1
0 votes
0 answers
220 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 ...
user2013092's user avatar
1 vote
1 answer
845 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 ...
Enock Lubowa's user avatar
2 votes
1 answer
9k 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, ...
user avatar

1
2 3 4 5
8