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

Route between two marker in android

I am trying to develop an android application. That i am using direction API for draw a route between two marker. I am using the below code for drawing route. When i am running application first time it is working fine. but at second time the…
Arya
  • 1,729
  • 3
  • 17
  • 35
1
vote
0 answers

Marker going outside the roads- even after using Google Map SnapToRoadAPI and Direction API

I am trying to show the path of my vehicle for a past trip and want to replay the vehicle moving on that path. I used my array of coordinates and used the SnapToRoad API to get all coordinates which are on the Roads. After getting all the points, I…
1
vote
1 answer

Google Directions OVER_QUERY_LIMIT

I am having a few issues with Google Directions API. I am receiving an OVER_QUERY_LIMIT error every time when I can see from the Google Console that is only a couple of queries in the last 24 hours, and I have definitely not gone over my allowance. …
1
vote
2 answers

How to find longest route between two location via Google directions api?

I am using google direction api to find route between two points. It is currently returning me shortest available route between two points. Is there is anyway to find the longest route between two point using google direction apis.
rana_sadam
  • 1,216
  • 10
  • 18
1
vote
2 answers

Problem with Direction API google map after the last update from google

I need to build a direction in my android application so 1- i get new key from google api console 2- i did the billing and got free trial 3- i follow the instruction in google developers but i have a problem Invalid Api key i note that there is…
it city
  • 11
  • 4
1
vote
0 answers

Finding direction and route from current location to marker direction api

I am currently working on school project on making a map related application. I somehow made to getting current location and making marker on searched address. I however does not understand how to find direction from current location to marker. I…
MangHatDa
  • 21
  • 6
1
vote
4 answers

Could not resolve com.google.maps.android:android-maps-utils:0.5+

I'm on android studio 3. Can't seem to get seem to get this dependency resolved by my gradle. `implementation 'com.google.maps.android:android-maps-utils:0.5+' It's important to note that I was forced to switch to the new format of using…
1
vote
1 answer

Google map's turn by turnGPS In app-navigation for iOS development

my app required to include turn by turn GPS navigation same as OLA, UBER, and taxi hire application. I have used the Google Direction API for showing path and duration. I have checked the following links but not helpful to me. gps navigation for…
Ilesh P
  • 3,940
  • 1
  • 24
  • 49
1
vote
1 answer

Google Maps Directions API Zero Results Error

We would like to draw a route between two points by using Google Maps Directions API. Request: https://maps.googleapis.com/maps/api/directions/json?origin=39.76700140,30.50334660&destination=39.49402464,31.84024373 Response: { …
1
vote
1 answer

Directive is not showing the directions in Angular google maps

I am using angular google maps in my angular 4 application. I am trying to get directions from a point to another point using directive. Here is directive source code, import { Directive, Input, OnInit } from '@angular/core'; import…
1
vote
1 answer

Type error: undefined is not an object(evaluating 'this.state.departure.loc.map) in React native maps

I am fetching my data from Google Directions and because the way the JSON response was set up, like this: Object { "geocoded_waypoints": Array [ Object { "geocoder_status": "OK", "place_id": "ChIJ2YDFT9zweUgRgt5Tws6n3hs", …
1
vote
0 answers

How do I get congestion color code from Google Maps/Directions API?

Depending on the congestion severity, Google Maps color codes the travel time/duration with Red, Amber or Green as seen below. How do I get these colors when I query Google Maps API? In the sample responses presented below, I don't see any…
1
vote
1 answer

Using traffic_model with arrival_time

When I was trying to get pessimistic travel time to get on specific time to a destination I get an error: { "error_message" : "Invalid request. Missing the 'departure_time' parameter.", "routes" : [], "status" : "INVALID_REQUEST" } My…
Luka Svalina
  • 108
  • 12
1
vote
1 answer

How can i use the features of travel_mode: transit and transit_mode: rail for my android application?

I am developing an application that will show the duration, transit and fares for railway journey but i cant find any way to use the features provided in google directions api for android. how to retrieve the data from the json file? and the mode:…
1
vote
1 answer

Is there any method to get a series of geopoints from source to destination in google directions api?

What I want is to get geo points from source to destination, distance between points can be 1 m. I think polylines are also made by connecting geo points between source and destination. What I don't know is can we get these geo points?