Questions tagged [google-directions-api]

The Directions API is a service that calculates directions between locations using an HTTP request. It is also available as part of the client-side Maps JavaScript API, or for server-side use with the Java Client, Python Client, Go Client and Node.js Client for Google Maps Services.

With the Directions API, you can:

  • Search for directions for several modes of transportation, including transit, driving, walking or cycling.
  • Return multi-part directions using a series of waypoints.
  • Specify origins, destinations, and waypoints as text strings (e.g. "Chicago, IL" or "Darwin, NT, Australia"), or as latitude/longitude coordinates, or as place IDs.

The API returns the most efficient routes when calculating directions. Travel time is the primary factor optimized, but the API may also take into account other factors such as distance, number of turns and many more when deciding which route is the most efficient.

Note: This service is not designed to respond in real time to user input. For dynamic directions calculations (for example, within a user interface element), consult the documentation for the Maps JavaScript API Directions Service.

This service is also available as part of the client-side Maps JavaScript API, or for server-side use with the Java Client, Python Client, Go Client and Node.js Client for Google Maps Services.

523 questions
-2
votes
1 answer

Google Directions API - different results for same request but with reordered parameters

I am generating the 3 following Google Directions API url with the Java Client: Result -> duration: 11:40 & durationInTraffic: 12:08 ->…
-2
votes
1 answer

PYTHON: Google API directions layers gives OVER_QUERY_LIMIT while displaying route between multiple points after 10 requests

I am working on a project to display routes using google map distance API between point A and B coming from a dataframe, I keep getting the error of " [directions layer] You have sent too many directions request. Wait until your quota replenishes".…
-2
votes
1 answer

How to find Google Map API Shortest route as Shown in Google map Route

I am getting trouble while getting the Shortest route . The Problem is that there is difference between the distance shown in google map and shortest routes get by the google.maps.DirectionsService(); I am also getting alternative roues but that…
-2
votes
1 answer

I'm always getting a single route no matter what origin and destination I set

I'm getting in my directions as explained in the docs. My link looks like this: https://maps.googleapis.com/maps/api/directions/json?origin=lat,lng&destination=lat,lng&mode=walking&key=KEY Which works perfectly fine. However, it doesn't matter what…
-2
votes
1 answer

Specify to the API to default to the nearest destination to the origin

Very simple question. I'm trying to pass to the directions API to give preference to the nearest destination to the origin. E.G. : Origin : Heleman Halls (In utah) Dest : Chic fil a When I try this specific example Maps API it selects a…
Kevin Young
  • 51
  • 1
  • 9
-2
votes
1 answer

Google Maps Directions API Optimize waypoints with exceeding 23 waypoints

There are several posts already about getting directions to Google Maps API if your waypoints exceed 23, but the answers about it do not account for if optimize_waypoints is True. The difference is, adding one stop to the list of addresses could…
Emac
  • 1,098
  • 3
  • 18
  • 37
-2
votes
1 answer

Is it necessary to url encode placeIDs in google maps/direction api?

It seems like it's not necessary judging from all the placeIDs that I've seen so far. So just making sure.
Jason Mantra
  • 105
  • 1
  • 8
-2
votes
1 answer

google maps directions return to origin

I'm trying to get routes of origin -> waypoint -> destination Everything works well except of one specific request: Origin (Point A) : PH Benidor, Calle Gaspar O. Hernández, Panamá Waypoint (Point B): BAC Credomatic | Sucursal Plaza New York,…
-2
votes
1 answer

Get shortest distance of a route with several waypoints from Google Maps Api

I need to get the shortest route with several waypoints A, B, C, D. So I need the shortest route from A to B, the shortest from B to C and so on. The way I understand is that the API should give me a few alternate routes from A to B, a few alternate…
-2
votes
2 answers

Google java client api direction api is giving wrong route

I am using Google's JAVA client API to get the route and i am sending the request like this, DirectionsRoute[] routes = DirectionsApi.newRequest(context) .mode(TravelMode.DRIVING) …
-3
votes
2 answers

Java Google Directions API

I am developing a Java Web application tha reads an Excel with adresses. (students adresses) I need to get the distance from one address to each one different adress in the spreadsheet (how far from the school adress each students live) I'm using…
-3
votes
1 answer

Google directions API not optimising way points

Steps to reproduce Add this in an iframe with an API Key https://www.google.com/maps/embed/v1/directions?origin=Tyne Tunnel Trade Park, Tyne Tunnel Trading Estate, Unit 3 Narvik Way, North Shields NE29 7DE&destination=Tyne Tunnel Trade Park, Tyne…
Danny
  • 1
-3
votes
1 answer

Google Maps API: Is there a way to find Segment information on a Route between 2 places

Google Maps API Is there a way to find Segment information on a Route between 2 places I have 2 places/addresses/latlong. I am looking for the direction between the two. For this direction, I need type information about the segment: Is it a road Is…
1 2 3
34
35