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
votes
1 answer

Travel Time using Google API

I want to get travel time betweeen two locations using Google API. I have already spent a couple of hours in sorting this out but no results yet. How do I do this?
-1
votes
1 answer

How to sort ArrayList of LatLng

I have an ArrayList of LatLngs. Is it possible to sequence them in order of distance from a reference LatLng? I'm practicing a delivery application which maps markers on the google map where i need to connect them using polylines (Like travelling…
-1
votes
1 answer

Google Map itinerary from geoJSON file

I'd like to draw an itinerary between 2 markers which are defined in this geoJSON file: { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": {"type": "Point", "coordinates": [-73.563032, 45.495403]}, …
Tibo M
  • 15
  • 1
  • 3
-1
votes
1 answer

form linked to google maps with jquery

I am trying to design a travel agency site. such that when a client enters his destination. example: from: London To: Dubai then click submit the google jquery map will show the link between this two countries on that same page. I have been…
-1
votes
1 answer

How to display places on a route of a given destination

I'm trying to add markers (for places) on a route. It's like getting directions in Google maps. There should be two text boxes for origin and destination. After click on submit button the map should display all the possible routes (for example there…
-1
votes
1 answer

Can I get a list of roads from Google Map Directions?

When getting directions via the google maps javascript API v3, is it possible to get a list of all roads encountered on the journey? The directions instructions obviously have the road names and these could be parsed/scraped out but I was wondering…
-1
votes
1 answer

How to draw a line snap to street given coordinates?

Given coordinates, how could I find the way to draw a line all over the street (or nearest street if coordinates are not so accurate) ? Example: I have these coordinates: 40.752443,-73.987376 (part of Broadway, NYC) … I would like to draw a line…
FlamingMoe
  • 2,709
  • 5
  • 39
  • 64
-1
votes
2 answers

Language translatation for direction information of Google Direction API

Following is the my code for getting direction detail.. Google Maps API v3 Directions Example