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
-3
votes
2 answers

Google map mileage function to return mileage between two addresses

For each loop quit working. public static function getMiles($to, $from) { $from = urlencode($from); $to = urlencode($to); $data =…
Dan
  • 27
  • 7
-3
votes
2 answers

How to retrieve specific data from JSON response?

Currently, I am using the Google Maps distance matrix API and get the following result when I run the following code: func configureRoute(origin:String,destination:String){ let jsonURL =…
Arnav GUPTA
  • 295
  • 1
  • 2
  • 17
-3
votes
2 answers

Get distance in Km between two lat lan address using Google Maps API

When running this code it did not give any value. But when replace lat lan value with (37.910689 ,-97.250977),(16.110560, -94.174805) then it returns result in meters. It shows blank output when passed any other lat lan value then the USA…
-3
votes
1 answer

PHP auto compute multidimensional arrays against one another

I have a multidimensional array. $parent_array($child1('lat','long'),$child2('lat','long')...) The amount of child arrays can be of any value per request starting from 2. The parent array is then called into a function that has a google distance…
-5
votes
1 answer

Google Distance Matrix and OR tools

We want to run an E-commerce where we need to route 50 vehicles over more than 1000+ locations optimally. We have used the Google OR tools and their respective examples. But, we can see that the OR tools are capable of solving the optimum routes…
1 2 3
26
27