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

Google Maps direction request without traffic

I have to write a program, that tells me the shortest way between two points. The traffic shouldn't be regarded. My Request is…
Lightspeed
  • 65
  • 1
  • 8
3
votes
2 answers

REQUEST_DENIED to Google Directions API

I was trying to draw directions on MKMapView after getting response from Google direction API. I am trying this as Apple server is not returning the direction result for locations in India and i found it somebody on stack overflow was facing the…
Varun Mehta
  • 1,733
  • 3
  • 18
  • 39
3
votes
1 answer

Is it possible to retrieve the time for a route with the iOS Google Maps SDK?

Using the Google Maps SDK for iOS, is it possible to calculate/retrieve the time for a route from location A to location B that is taken by bike, by car or or walking as it is done in the regular Google Maps app for iOS? I know that directions can…
3
votes
1 answer

google directions doesn't return any routes when using certain waypoints

I'm using google directions in order to get a route with waypoints. I have the name of the waypoints from an previous call to the Places Api. The problem is that if I make this call:…
sa_vedem
  • 757
  • 1
  • 7
  • 16
2
votes
4 answers

How to avoid both tolls and highways for Restrictions in Google Directions API?

Google Directions API allows us to attempt to avoid tolls by supplying the argument &avoid=tolls. Also, we can attempt to avoid highways by supplying the argument &avoid=highways. I was wondering how do I supply the arguments for avoiding both tolls…
Pacerier
  • 86,231
  • 106
  • 366
  • 634
2
votes
2 answers

how to Draw train route map between source and destination in android

Possible Duplicate: Android draw route on a Mapview with twoo POI-s I draw route map between two areas using Google direction API, but I am thinking to draw train route between two stations in android. Can anyone help me?
Phanikanth
  • 69
  • 2
  • 7
2
votes
1 answer

Google Maps API - Setting 3 lat/long points

In a url we wish to set 3 points for the trip, not just two like this example: http://maps.google.com/maps?saddr=49.34593,-123.1807&daddr=49.35037,-123.1749 How do we do that?
Ian Vink
  • 66,960
  • 104
  • 341
  • 555
2
votes
0 answers

Load Google Direction Service on Vue

I'm new to Vue and have been having a bit of difficulty setting up DirectionService. I wanted to set up a google direction service to show on my map, I've got the map setup and Autocomplete working, I'm also using a plugin by Fawmi…
2
votes
0 answers

How do I get number of toll gates between two points in google direction api flutter?

I want to get number of toll gates coming between two points i.e Source and the destination. I wanted to show the number of toll gates on google map that are coming on the way. How am I supposed to do this? I am using the distance formula that…
2
votes
0 answers

Excel webservice formula with Google-directions API

I would like to extract data in an Excel file from an XML result of a direction query. I use the ServiceWeb function in Excel with this…
2
votes
1 answer

How to use Google Directions API key free?

I'm asking this question since my Final Year Project requires calculating distance between two markers. But upon using the Google Directions API key which I've registered and created it, the server returns me this result (Screenshot link below,…
2
votes
0 answers

React Native Maps: Is it impossible to draw a route between two locations without paying?

I need to draw a driving route between a vehicle and a destination in my React Native app. I've been looking for solutions, and the most straightforward is this guide. This uses the Google Directions API, and it looks as though you have to set up a…
2
votes
1 answer

Bus Stop Schedule

I'm having some trouble retrieving some information about the bus stop schedule of a single bus stop. Basically, when I open the bus stop on google maps, I can see all bus lines for that stop and it's respective schedule time. After clicking on see…
2
votes
1 answer

Removing travelled polyline from GoogleMaps iOS Swift

I am try to remove travelled polyline from google maps but can't find any proper solution on internet. I've drawn polyline by this, let origin = "\(24.96487181552221),\(67.06045475052892)" //add worker lat long here let destination =…
2
votes
1 answer

Unit testing of HttpsCallable cloud functions - online mode

I am designing a backend api (for android and iOS apps) around HttpsCallable cloud functions. It becomes quite cumbersome to test them through the app, so I wish to switch to unit testing the functions (before production deployment) using the…