1

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 many points or invalid API key

Here is the exact URL - you can put this into the browser address bar and see for yourself. (You'll need to use your own API key though)

https://roads.googleapis.com/v1/snapToRoads?path=12.9225471,77.6711921|12.9225471,77.6711921|12.9225468,77.6711909|12.9225468,77.6711909|12.9225468,77.6711909|12.9225468,77.6711909|12.9225468,77.6711909|12.9225468,77.6711909|12.9225468,77.6711909|12.9225665,77.6711702&key=YOUR_API_KEY

Using interpolate=true did not help (i.e. still {} in the response)

duncan
  • 31,401
  • 13
  • 78
  • 99
Mandar Vaze
  • 1,324
  • 13
  • 20
  • You repeat `12.9225471,77.6711921` for the first two coordinates. Then you repeat `12.9225468,77.6711909` for the next seven coordinates. It'd probably be wiser to eliminate all duplicates; it's more likely to work properly. Try `https://roads.googleapis.com/v1/snapToRoads?path=12.9225471,77.6711921|12.9225468,77.6711909|12.9225665,77.6711702&key=YOUR_API_KEY` – duncan Mar 29 '16 at 13:13
  • There are no roads near there, the points are all in the middle of an apartment complex (Akme Harmony Apartments). – geocodezip Mar 29 '16 at 15:24
  • Removing duplicates (the URL you suggested with my API_KEY) also returns empty response just ``{}`` – Mandar Vaze Mar 30 '16 at 01:19

1 Answers1

0

The issue here with coordinates. Please see working example: https://roads.googleapis.com/v1/snapToRoads?path=60.170880,24.942795|60.170879,24.942796|60.170877,24.942796&key=YOUR_API_KEY

Also similar question here

Community
  • 1
  • 1
Marsel Novy
  • 1,777
  • 16
  • 23