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
1
vote
0 answers

Google directions route not working properly

I have a project that needs to have multi-colors for a route between two points. I have used Google maps API to get the code working. Here is the code I am working on. HTML part:
user2809895
  • 331
  • 1
  • 3
  • 8
1
vote
1 answer

whats wrong in getting transit direction?

when I use this url to get driving direction , it gets me json correctly and it works properly :…
Arash Khoeini
  • 1,276
  • 1
  • 11
  • 17
1
vote
0 answers

Complete google directions api response is not received

I am using Google Directions API for Android and getting a JSON response. Only problem is the response stops receiving exactly after 15422 characters (i.e. response stops exactly while in the middle of the 4th step). I tried varying the buffer size…
Lizzy
  • 2,033
  • 3
  • 20
  • 33
1
vote
0 answers

google distance matrix with python

My problem is i want to get the distance for around 4000 lat longs . I have used Google Direction matrix service for this. To certain extend it worked fine for me. After that i am getting the error of Invalid request .Its because of GET method. I…
1
vote
0 answers

Weird issue in route drawing in Android google MAP

In one of my android app I have to draw a route between two points(say A & B). I am drawing the route using Google Direction API+Google Parser+Route overlay class. Everything is working perfect but sometimes a very strange route is drawn that does…
1
vote
1 answer

customize text in the directions panel google maps v3

Right now I am using google maps v3, and when i try to get directions between two locations i am displaying the waypoint and stuff as below Start: Chesterfield Airport Road & McBride and Son Center Drive, Chesterfield, MO 63005, USA 1.1 mi -…
user2486535
  • 428
  • 1
  • 5
  • 21
1
vote
1 answer

Google direction API returns REQUEST_DENIED when called from Android

I have this code using which I am trying to call the Google directions API webservices from my Android device: (4.1 HTC 1X). However I get the response REQUEST_DENIED. Why? Here's my code - nothing fancy here: String…
sunny
  • 643
  • 2
  • 11
  • 29
1
vote
1 answer

How to find distant waypoint in google map api v3

I want to plot optimized route in google map using map api v3. I will have list of waypoints and start location but i don know the end point. So how can i find distant point (from my list of waypoints) from the given start location. Example I'm…
Asraf
  • 333
  • 1
  • 10
  • 24
1
vote
1 answer

Google Directions API - can you query for directions with waypoints and alternatives set to true

Is it possible to get alternate routes from point A to point B which goes through C, D and E? If I set waypoints I can't see any alternate routes. Also how reliable is google directions API? When I don't give waypoints and ask for alternatives, I…
opensourcegeek
  • 5,552
  • 7
  • 43
  • 64
1
vote
1 answer

Getting No response from google direction api

I am using google direction api to get direction/routes between two places. When I query…
Shehzad Bilal
  • 2,535
  • 2
  • 18
  • 27
1
vote
1 answer

How do I get Google Maps directions to recognize establishment from the Places API?

I am trying to show directions between 2 'establishment' search results from the Places API, but what is the best way to pass these locations into directions? When I use the Places library and get the search results, it seems like the best way to…
1
vote
1 answer

How to check one place is present in route or not using Google Directions API?

I have one place I want to check that place is present between route of Source and Destination using Google Directions API. for example: A - source B - destination and C - is the place. Now i want to check that C is present or not in A to B…
Madhav Palshikar
  • 282
  • 4
  • 12
1
vote
0 answers

bad uri on rails google direcrtions api

I am trying to send request to google directions api on rails and I tried a few things, this is what i have now - url = URI.parse(requested_url) full_path = (url.query.blank?) ? url.path : "#{url.path}?#{url.query}" the_request =…
user1666543
  • 665
  • 1
  • 10
  • 19
1
vote
3 answers

Does Google Directions API take accounts to traffic?

i know in the google map application for android, it does. However i am not sure if it does for driving direction using https://developers.google.com/maps/documentation/directions/
ericlee
  • 2,703
  • 11
  • 43
  • 68
0
votes
1 answer

Google Directions API, reduce XML output size

I'm using the Google Directions API specified here https://developers.google.com/maps/documentation/directions/ it's working good, but the XML returned is a bit large, I don't need all the data they give. the questions is, can I ask for a specific…