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

How to rerequest specific route alternative using Google Maps API

I am working on a service where a user plans his route using the Google Direction Service. GDS returns (if available) alternatives and the users can choose one of these for later usage. This part works: I know how to do the first request including…
Frank M.
  • 126
  • 2
2
votes
0 answers

How to keep updating the displayed route obtained through Google Directions API as user moves towards the destination?

I obtained driving directions to a destination in my Android app. Now as the user progresses towards the destination on this route, I want to hide the portion of the route already covered and update the remaining distance. Also, if the users strays…
Price
  • 2,683
  • 3
  • 17
  • 43
2
votes
1 answer

Google Directions API - adding a via waypoint results in an error

I'm trying to an ETA from point A to C with a waypoint in-between, B. This is the call I'm making to…
2
votes
0 answers

Polylines is not coming perfectly on google map in ios

I am trying to draw path on google map in ios7 . For that i used json data which is provided by google map. i am using google direction api and i able to draw path between two place. when i am using path for near place then it is coming fine but…
2
votes
1 answer

Google Directions API (Transit mode) returns only one alternative route per request

I have built an small application which calls the Google Directions API in Transit mode. It works - nevertheless it returns only one possible route, so it shows no alternatives. Usually I expect 3-4 options to choose…
Bizarro
  • 399
  • 4
  • 12
2
votes
1 answer

Draw routes between current location to another locations in android?

I am drawing route between one location to another location successfully using http://iamvijayakumar.blogspot.in/2013/04/android-draw-route-between-two-geo.html this link, now I am trying to draw routes between current location to all locations what…
DurgaPrasad Ganti
  • 1,008
  • 4
  • 20
  • 41
2
votes
1 answer

List of all google direction instructions

I'm working on Google Map direction for my mobile applications. As you know Google Direction API has a instruction for each step of direction. For example "turn right","turn left", "Head", take the second exit onto" are some of them. I need to…
Husein Behboudi Rad
  • 5,434
  • 11
  • 57
  • 115
2
votes
2 answers

parse json file from google direction web service

I want to create an android application where the user can select the start and end point then the application will calculate the distance and time take taken to reach the destination. in order to do that, i use the google direction web service.…
MAJ
  • 27
  • 1
  • 6
2
votes
0 answers

Split google maps route in few equal segments

I'm trying to find a way to split google distance route in few segments and get points of it. Main idea is to get places(from google places service) in between two points. But not for all route, just for few points in between. I was thinking about…
Kęstutis
  • 535
  • 7
  • 18
2
votes
3 answers

Clear / Reset Direction Panel in Google Map API v3

Every time we search the route by the direction service, the result will be append to the bottom of the direction panel. Some people recommend to reset the panel in div tab as null... Can anyone suggest how to do it... function calcRoute() { …
Jimmy Lee
  • 91
  • 3
  • 11
2
votes
1 answer

Google polylines taking too much time to get rendered

I am developing an iPhone application which uses google maps. For the same application, I use google direction WebService to get direction between 2 locations. I fetch encoded polyline from google direction web service response and decode it. After…
2
votes
3 answers

Explaination of time format (Google Directions API)

I have read the documentation of the Google Directions API for making a direction request. An example of a URL is given as…
androideka
  • 71
  • 1
  • 11
2
votes
1 answer

Django and JSON POSTs with Google API craze characters

Background I am building an app that helps people search for lifts. I'm using Django, Python2.7 and the Google maps and directions APIs. In one view I use a map and allow the user to pick a few locations as well as arrival and leaving times. Then I…
Sheena
  • 15,590
  • 14
  • 75
  • 113
2
votes
0 answers

Maps API 3 Directions with fuzzy via co-ordinates

I have a number of GPS co-ordinates that describe a route. My intention is to draw a polyline along the route, and then colour segments based on some data I have. Problem is, the GPS coordinates can occur on the roadside either side of main roads.…
user1407764
  • 179
  • 1
  • 1
  • 8
2
votes
2 answers

Finding address by distance value, in Google Maps Api?

I want to find a specific address that, is neither user-configurable nor static or known in advance. In other words I want my application to be able to calculate what address is placed in a distance away from a known location. Is there a way to…
user1732457
  • 177
  • 1
  • 2
  • 15