Questions tagged [google-roads-api]

The Google Roads API identifies the roads a vehicle was traveling along and provides additional metadata about those roads, such as speed limits.

The Google Roads API allows you to map GPS coordinates to the geometry of the road, and to determine the speed limit along those road segments. The API is available via a simple HTTPS interface, and exposes the following services:

  • Snap to roads This service returns the best-fit road geometry for a given set of GPS coordinates.
  • Nearest roads This service returns individual road segments for a given set of GPS coordinates.
  • Speed limits This service returns the posted speed limit for a road segment.

The Roads API is also available with the Java Client, Python Client, Go Client and Node.js Client for Google Maps Services.

45 questions
1
vote
1 answer

snap-to-road returns empty response

I'm referring to this API I'm getting empty response from the API. There is no error, just {} in the response, instead of "snappedPoints" What does it mean ? Where can I find the documentation about errors ? Some errors have helpful message like too…
Mandar Vaze
  • 1,324
  • 13
  • 20
1
vote
2 answers

Google Map Road API not interpolating path and not giving smooth route

I am trying to get smooth route for below route path using road API in Roads Inspector but not getting smooth route.Google road api failing to provide smooth route.Some portion of route is not smooth with actual road route e.g at turns, at bridges…
1
vote
1 answer

Interpolate google maps android roads

I'm doing an Android application that get from server LatLng points of a route and write a polyline snapped to road. To get roads points I'm using the Google API Roads., but in the response I only get the same points that I send in the request. The…
xmartinez
  • 43
  • 6
1
vote
0 answers

Android Google Maps Polyline not showing on Map

I have made a class that have a method and a locaton listener. The locationListener will be executed every 2 seconds , gets the lat longs and will pass it to the Async Task. The Async Task class will pass the lat longs to Google Road Api to get…
Akshay Sood
  • 152
  • 1
  • 3
  • 15
0
votes
0 answers

I am getting "Cannot resolve method 'snapToRoads()' " error for the following code...how to fix it?

I am trying to use Google Roads api, in which want to call a method snapToRoads, but I am facing an issue. I tried to use other method of snapToRoads, but it also shows same error LatLng[] page = latLngs .subList(lowerBound, upperBound) …
0
votes
1 answer

Draw custom route on map

I have university area and its Google map routing is undefined inside university. I want to define the roads from academic building to parking because inside university the route on the map not shown.Now anyone guide me that how to define my …
Muhammad
  • 127
  • 1
  • 2
  • 13
0
votes
1 answer

Is there a good way to minimize load on Google Maps Roads API?

I am developing a proof of concept/prototype for an internal tool. The basic premise is, that we have a couple of units that have a GPS on them, and they report their location (with typical GPS accuracy in NMEA format) to a java api I have built in…
Barry Chapman
  • 6,690
  • 3
  • 36
  • 64
0
votes
1 answer

google maps roads api looping - how to stop

I've implemented the code seen at: https://developers.google.com/maps/documentation/roads/inspector. In each of the examples on this page, the marker animation loops. How are you supposed to stop the looping so that the icon remains at the end…
Mike
  • 3
  • 1
0
votes
1 answer

Google Apis Nearest Roads to snap roads

I am new to use Google api nearest roads to snap the roads. I was trying as in the below link: Google api for nearest road If I have to try the https://roads.googleapis.com/v1/nearestRoads?parameters&key=YOUR_API_KEY with the api key provided in…
pgman
  • 493
  • 3
  • 12
  • 21
0
votes
1 answer

Set speed limits on Maps layer

I would like to create a map with a layer, like a traffic layer, but with the speed limits of roads (route, highway,...) with the différents speed. How can I create a layer with speed limits of all roads?
0
votes
1 answer

How to calculate distance using lists of coordinates with Google Maps Roads API

I'm generating static map with snapToRoads (since it accepts multiple waypoints). Given I have lists of coordinates, how can I calculate distance between those coordinates and sum it to get total driving distance. Or is there other better way to do…
aldrien.h
  • 3,437
  • 2
  • 30
  • 52
0
votes
0 answers

Match two java collections by property avoiding ConcurrentModificationException (example of Google Roads api)

I haven't found any similar questions, where one collection is accessed while looping through another. Most of the questions about two collections and loops refer to simultaneous looping through both collections. I'm using Google Road API in my…
Valeriya
  • 1,067
  • 2
  • 16
  • 31
0
votes
2 answers

google map apikey works, but road apikey not working

I am using both road api and map api. But I can't get apikey for road api work, in comparison, the apikey for map works fine. Here is my apikey for road: AIzaSyDRknPaFTzqrmHCTyQ6QGcrQMjGFQtK7bg and…
user1470393
  • 317
  • 4
  • 12
0
votes
1 answer

Google Road Api SnapToRoad golang

I was trying to implement google's snaptoroad api. But I am not getting any output. I am using golang for the implementation. My Code is as follows: mapClient, err := maps.NewClient(maps.WithAPIKey(GoogleApiServerKey)) if err != nil{ …
Arjun Ajith
  • 1,850
  • 5
  • 21
  • 46
0
votes
2 answers

Google Maps API - Show all local roads when zoomed out

Hi my first post on Stackoverflow. When viewing country areas in Google maps the screen is very sparse. I would like to make all local roads visible at a wider loom level. At present the local roads disappear at zoom 11z. I would like to be able to…
Trevor Tighe
  • 11
  • 1
  • 2