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

What is the polylineOptions parameters of the new Google Maps website?

I developed a website using Google Maps direction. My Polyline configuration is as following: var lineSymbol = { path: 'M 1.5 1 L 1 0 L 1 2 M 0.5 1 L 1 0', fillColor: 'black', strokeColor: 'black', strokeWeight: 2, …
Anton R
  • 519
  • 1
  • 6
  • 14
4
votes
4 answers

How to decode Polylines from Google Maps Direction API in PHP

I have json response from the following URL: http://maps.googleapis.com/maps/api/directions/json?origin=Chicago,IL&destination=Los%20Angeles,CA&sensor=false JSON path…
Shehzad Bilal
  • 2,535
  • 2
  • 18
  • 27
4
votes
1 answer

Android Google Maps Directions on MapView

I'm trying to find a way to use Google Map Directions to show the directions to point A and point B without launching it as an Intent which opens the map on either Google Navigator or on your phone web browser. Is there a way to have Google…
4
votes
2 answers

Array to create multiple routes on Google Maps v3

I have a Google Maps project, and I want to do an array to create multiple routes using directions. For example, I click on the map and appear a marker named "A", and when I click the second time, display a marker named "B". Ok, this is working. But…
3
votes
5 answers

react-google-maps/api DirectionsService keeps rerendering itself

I have written this code in react JS to using "react-google-maps/api" to calculate route between two points. Now my google map keeps rerendering itself until it gives "DIRECTIONS_ROUTE: OVER_QUERY_LIMIT" error. I don't know what's the issue. Help…
3
votes
1 answer

Google Directions API: Get the current step JSON-Object to current position on Android

I am using the Directions API from Google. Now I would like to determine the current step to the current location of a user. Here is an example from the google website: { "status": "OK", "geocoded_waypoints" : [ { "geocoder_status"…
FabASP
  • 581
  • 1
  • 6
  • 20
3
votes
1 answer

Google maps DirectionApi : FATAL EXCEPTION: Rate Limited Dispatcher

description: I want to get result from direction api using Java Client for Google Maps Services.But when i click onInfoWindoclickthen i got FATAL EXCEPTION: Rate Limited Dispatcher error on my android studio.Please anyone help me.I try solve this…
3
votes
1 answer

How to use Google-Directions-Android library with a restricted API key

I am new to Android and working on a google map project. For this I am using this library to draw a route between two points. This works fine when there is no restriction on the google map api key. But when restriction is applied to my app's…
3
votes
1 answer

Restrict Google Directions API key in Flutter

I've been developing a mobile app with Flutter and want to release it soon on the Play Store. It uses the Google Directions API, and now I want to restrict the API key to this specific application. I was able to sign the app, and I've restricted the…
3
votes
1 answer

Googleway not considering traffic for travel time (directions search)

Using the google_directions function from googleway package, it does not display the travel time according to google maps browser search. It seems that it is not taking into account the traffic information. Example on a busy street in New York. a <-…
3
votes
1 answer

Remove travelled path from GMSPolyline on GMSMapView Swift iOS

I am using google distance api ["https://maps.googleapis.com/maps/api/directions/json?origin=" +start.latitude + "," + start.longitude +"&destination=" + end.latitude +"," + end.longitude + "&alternatives=false" +"&mode=driving&key=" + key;] to get…
Muhammad Usman
  • 200
  • 1
  • 14
3
votes
1 answer

Mark highway from Google Maps Directions API response

I'm currently working on a project using google maps Directions API on Android. When i make any direction request i get a response such as this one I'm actually able to decode the point's to get a List of subsequent LatLng coordinates to reach. Now…
Luca Reccia
  • 578
  • 3
  • 16
3
votes
1 answer

Google Directions API and android

In my app I use Google Directions API to draw a route from point A to point B on my map. When I try to get my route I get 403 with message "This IP, site or mobile application is not authorized to use this API key.", but this issue arises only when…
StopTalking
  • 95
  • 1
  • 5
3
votes
3 answers

How to draw polylines from Google Directions Api

I'm trying to draw a polyline from what the Google Directions Api returns, the api has this field, overview_polyline, I'm assuming that this field contains the entire polyline so I was thinking why not draw the polyline from there, this is what I…
alb
  • 347
  • 2
  • 7
  • 24
3
votes
1 answer

How to set travel mode to "Flight" in google map direction API .

I'm using google map direction API in our application. Map with directions working well with traveling modes like Driving,Walking,Transit and Bicycling. But it not showing flight directions when we enter two cities from different countries. So for…
SP Developer
  • 153
  • 2
  • 10