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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
43 views

How to Generate Route Between more than two Locations(way points) in Google Map in Android?

Draw a poly for two locations is fine and with the help of waypoints response it will be drawn only for first waypoint. Could you please help me out With the help of the Google Maps API response with ...
Anilkumar Marla's user avatar
0 votes
0 answers
14 views

google directions api always returning empty route

I'm trying to make use of the directions api to draw route on map. I created the interface below so I can call the getRoutes() Function inside the interface in the mainactivity and access texts from ...
kosi's user avatar
  • 1
0 votes
0 answers
26 views

google directions api returning zero routes

I'm trying to make use of the directions api to draw route on map. I created the interface below so I can call the getRoutes() Function inside the interface in the mainactivity and access texts from ...
Kossy's user avatar
  • 9
0 votes
0 answers
22 views

How can I extract only a part of the road rather than analysing the whole road using GoogleMaps API?

I am using GoogleMaps Directions API to extract the main road one can take from origin to destination as an output. Origin: Stuttgart, Germany Destination: Frankfurt, Germany Output: ['A6'] The ...
Ekagra Gupta's user avatar
0 votes
1 answer
46 views

How do I mention only the major highways as output rather than local roads?

I am using Directions API to get a route segment (list of destinations to reach a particular destination). origin = "New York" destination = "Ohio" output: ['2 Murray Street, New ...
Ekagra Gupta's user avatar
0 votes
0 answers
91 views

Update polyline in flutter as google does it in Google Maps App

Current, i'm implement tracking + navigation to specific point by updating polyline on change of current location. this process is very costly because it calling direction Api on every new location. ...
Umer Azeem's user avatar
0 votes
1 answer
38 views

main polyline is not being selected on created map

I'm trying to create a simple program where I can display all the available paths from one point to another using google maps and let the user select any one of the path generated. I wrote a code for ...
Anil Parshi's user avatar
0 votes
0 answers
33 views

I am using google directions api to draw a route on map, it is working fine in chrome but taking very long time to response in android app

I am using google directions api to draw a route on map, it is working fine in chrome but taking very long time to response in android app i am using directions api url to get response, it was working ...
CM Dhakar's user avatar
0 votes
0 answers
25 views

Polyline in react native

I am newbie to react native, and I have this problem in polyline in react native. Im using android only. In our realtime database, we have ADMIN Collection , the datas are information about admin and ...
helloFriend's user avatar
0 votes
0 answers
56 views

Recieve IllegalStateException when I try to build GeoApiContext to get polyline for my maps

I am trying to display the distance between two points as a polyline on the google maps in my app. For some reason this line of code keeps giving me the same exception which causes my app to crash at ...
kinghabz 14's user avatar
0 votes
2 answers
133 views

How to return "waypoint_order" in Google Routes API?

I'm developing a system to trace a route using the Google Routes API. https://developers.google.com/maps/documentation/routes/intermed_waypoints I have the origin and destination points and between ...
Daniel Ribeiro's user avatar
1 vote
1 answer
97 views

How to resolve getting an unambiguous error message from Node.js Client for Google Maps Services

I am trying to use the Google Maps Directions API in my Node.js application to get optimized routes between multiple waypoints. I haven't been able to make successful requests and receive responses ...
liryc's user avatar
  • 11
0 votes
0 answers
79 views

Android directions api not working after putting google key application restriction for android

We have created the google credential key, which we are using for maps as well as directions. When we are setting a Application restriction to NONE for Google Maps Direction Api just works fine. But ...
imimobile pvt's user avatar
0 votes
0 answers
93 views

can't decode lat/lng in flutter_google_map(flutter_polyline_points)

this is example code in pub.dev import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:flutter_polyline_points/flutter_polyline_points....
최재성's user avatar
0 votes
0 answers
53 views

onFailure: timeout after making 1 or 2 direction requests

I'm trying to make an app with places and directions I have done that but after 1 or 2 direction calls I just get onFailure: timeout and nothing shows on the screen. I am using firebase for markers ...
ALIBABATRAVEL's user avatar
0 votes
0 answers
160 views

getting null pointer exception java.lang.Class java.lang.Object.getClass()

I implemented Direction API in my app it works perfectly on debug build but getting crash on release build I think it is because of proguard rules what rule I want to add in proguard to resolve this ...
Mohanasundar's user avatar
0 votes
0 answers
199 views

How to display only one route with a waypoint using Google Map API Kotlin Android

I'm trying to draw a route from a source point (lat/lng) to a destination point (lat/lng) with 1 waypoint (lat/lng) using Google Map API for Kotlin Android. I have the code working to display the ...
Nakk24's user avatar
  • 1
0 votes
0 answers
89 views

How can I get a route given by the Directions API as a full set of LatLng pairs of coordinates?

I want to calculate the minimum distance between a point and a polyline with JavaScript and TurfJS. I can use the pointToLineDistance function for that, as follows: var pt = turf.point([0, 0]); var ...
Mateus Riff's user avatar
0 votes
0 answers
396 views

Flutter walk & draw polylines following current location

Using flutter_polyline_points: ^1.0.0 & google_maps_flutter: ^2.2.1 So what I am trying to achieve is to draw polylines on Google Map at flutter following current WALKING user location [using ...
Kamil Rytel's user avatar
-2 votes
1 answer
307 views

Draw a Polyline in a Google Directions Route

So, basically I created a route with Google Maps using Directions. How do i decode this overview_polyline? function calcRoute() { var waypts = [ { location: "Sao José dos campos,SP", ...
rafael rocha's user avatar
1 vote
0 answers
68 views

Unable to show polyline in Google Maps Directions using react-google-maps-api

I am trying to show directions on google map. I am getting correct directions data but direction renderer only showing origin and destination markers but polyline or precisely route is missing between ...
Ahmad Hassan's user avatar
-2 votes
1 answer
60 views

Is Google Directions API route recommendation updating according to real-time traffic?

I'm building a route recommendation app in Android Studio where the user can see the best route between two destinations on the map. I am using Google Maps APIs for that and I know that it's using ...
IoanaBanu's user avatar
0 votes
1 answer
373 views

Changing Google Maps polyline color only changes a part of the polyline of alternative routes

When a user selects two locations, I'm trying to show one main route and two alternative routes. The main one's in blue and the other two are in gray. It works as expected. I want to change the color ...
Tashila Pathum's user avatar
0 votes
0 answers
269 views

Google Directions API not giving JSON response data

The directions api is not working in my Flutter web app. When I request I get no response JSON data and this runtime error: <error: Bad state: Source maps are not done loading.> at Object....
ihatecoding's user avatar
0 votes
0 answers
124 views

google map direction with multiple colors [duplicate]

I trace route between two points using directions API google map .I want to use one color for the route starting from pickup point to the middle point route , and the other half of route another ...
alice evra's user avatar
0 votes
1 answer
181 views

Google Maps Direction API response not mapping with road

I am trying to call directions API and showing the route on Map, but the route is not perfectly matching the road. Here's how I am getting Directions: suspend fun getGoogleDirections( origin: ...
mohit48's user avatar
  • 722
1 vote
1 answer
584 views

Google Directions API distance calculation from VBA

I used a tutorial to automatically calculate travel distance using Google Directions API, based on addresses I enter in Excel. I succesfully created an API key and I used a tutorial page that showed ...
SanderVeeken's user avatar
2 votes
0 answers
733 views

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'...
Silvinecoder's user avatar
-2 votes
1 answer
107 views

Get exception in every input address google map directions problem

I use google map with api places . Fill input origin then destination and set direction between two points. My problem is in every fill input I got this message . Any idea please to resolve this ...
alice evra's user avatar
-1 votes
1 answer
254 views

Flutter - calculate mileage driven using geolocator and google api

I am using the Google Directions API, initially to get the detailed from/to directions, i.e. from let's say Denver to Chicago. What I need to do is get actual road mileage as they are driving. I am ...
AidanW's user avatar
  • 1
-3 votes
2 answers
96 views

Java Google Directions API

I am developing a Java Web application tha reads an Excel with adresses. (students adresses) I need to get the distance from one address to each one different adress in the spreadsheet (how far from ...
Itamar G Jr's user avatar
-3 votes
1 answer
131 views

Google directions API not optimising way points

Steps to reproduce Add this in an iframe with an API Key https://www.google.com/maps/embed/v1/directions?origin=Tyne Tunnel Trade Park, Tyne Tunnel Trading Estate, Unit 3 Narvik Way, North Shields ...
Danny's user avatar
  • 1
0 votes
1 answer
161 views

Why is the polyline not drawn on the map

I am trying to draw a route between two coordinates. The project consists of several fragments, when the fragment with the map is loaded, the route should be drawn immediately by coordinates. fun ...
lian. lun's user avatar
  • 115
0 votes
1 answer
493 views

How to move Google Map marker automatically as driver is moving

I'm trying to figure out how we can track driver position on Google map as he is moving. Here's my code: public class TrackDriverActivity extends AppCompatActivity implements OnMapReadyCallback { ...
anta40's user avatar
  • 6,527
2 votes
0 answers
253 views

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 ...
Usama Bin Tahir's user avatar
0 votes
1 answer
588 views

In Flutter google maps api, when current location is changing on the map, how can I guide the driver to take left or right

I have my app in Flutter and using google map in it, I'm faced to this problem; when my driver going from source to destination my app should notify him to take left or right when arrive in some ...
Zia's user avatar
  • 506
-2 votes
2 answers
2k views

How to use Google Maps directions API in Flutter (is it a good practice to keep calling directions API while current location is changing on the map)

In Flutter I use google_maps_flutter, google_directions_api and flutter_polyline_points packages to have a map with the following functionalities; Drawing routes between current location and ...
Zia's user avatar
  • 506
-2 votes
1 answer
103 views

Google Directions API don't consider depature dates for temporarily closed routes

I want to use the directions API from Google Maps to get a route between two waypoints. For example take these two: Barcelonnette, 04400, France Cime de la Bonette, 04850 Jausiers, France There is a ...
Leon Braun's user avatar
-1 votes
1 answer
62 views

API directions answer with multiple mode

how can i get from una url API directions more then one mode? for example have in the same answer the time fore the mode transit and the time for the mode walking
Luca Varuolo's user avatar
-1 votes
1 answer
68 views

Google maps returning two different routes

I am surprised when I am finding the directions between two locations on google maps(maps.google.co.in) one using LAT, LNG, and the other one using the google suggested name. The routes returned are ...
Shikhar Kant Tiwari's user avatar
0 votes
1 answer
524 views

google maps direction api: python vs javascript

I am facing this weird problem. I've been using the google maps APIs using javascript the whole while and now had to use google maps API using python for some reason. The issue I'm facing is that I ...
Karthik's user avatar
  • 31
0 votes
1 answer
57 views

Google Direction service plotting unexpected route

I have an asset i.e. a truck generating reads (lat, lng) at a specific interval and I am plotting those reads on maps using direction service api But direction service is returning path which is not ...
rahul's user avatar
  • 7,563
0 votes
1 answer
120 views

Google maps api for geo-direction for interactive website

The code is for developing an interactive website for routing directions between given geo coordinates. The javascript, css and html are used for the interactive website creation. Something is missing ...
Rob's user avatar
  • 19
0 votes
0 answers
370 views

Google Direction Requested route too long

We are trying to generate a route into out application. We have source location and destination location. We are using google's direction api to fetch the geocoded_waypoints and plotting it on map. We ...
Parth Dhorda's user avatar
0 votes
1 answer
226 views

Why can't I get an overview polyline from my directions api request [duplicate]

I am trying to plot polylines that include waypoints on my map in Xamarin forms. Now, I'm sending the following request to the Google Directions API https://maps.googleapis.com/maps/api/directions/...
Kudakwashe Mundangepfupfu's user avatar
0 votes
0 answers
35 views

How can I plot polylines/routes on Xamarin Forms maps for a route with more than 3 destination points/ waypoints? [duplicate]

I'm new to using google maps and wanted to use the map to plot routes with waypoints (stopovers/other destinations within the route) on my map in Xamarin Forms. Well, at the moment I have managed to ...
Kudakwashe Mundangepfupfu's user avatar
-1 votes
2 answers
779 views

Basic usage of Google Maps Directions API in client-side JavaScript [duplicate]

In the process of making a Firefox-extension, I'm testing out the Google Maps Directions API. Using the API I would like to make client-side requests to find directions between addresses from the ...
glennib's user avatar
  • 63
2 votes
0 answers
447 views

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 request: =SERVICEWEB("https://maps.googleapis.com/maps/api/...
ASR's user avatar
  • 21
0 votes
0 answers
221 views

Google Directions API sum of steps duration inconsistent with total leg duration

I'm using the Directions API with 'transit' mode and as a sanity check I compare the total distance and duration of one (there is only one) leg and the sum of its steps. I get that the distances add ...
Edvin444's user avatar
0 votes
1 answer
719 views

directions in google map

I want to show directions in google map (android studio , java) package com.example.travel; import androidx.annotation.NonNull; import androidx.appcompat.app.AlertDialog; import androidx.appcompat....
pljni613's user avatar

1
2 3 4 5
11