1

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 request: https://roads.googleapis.com/v1/snapToRoads?interpolate=true&key=AIzaSyCcorJdwrFQp5HpR0she_r3PEVOj1TrUTI&path=43.342592253801136%2C-1.7633818398462608%7C43.333786678427664%2C-1.8170163652393967%7C43.31891938155728%2C-1.9850535434670746

What I'm doing wrong?

Thanks.

Anoop M Maddasseri
  • 10,213
  • 3
  • 52
  • 73
xmartinez
  • 43
  • 6

1 Answers1

0

it took me 10min to figure out the issue actually your api is working well but the data you are sending is wrong means to say there is no path available between those points.

check this out https://roads.googleapis.com/v1/snapToRoads?interpolate=true&key=AIzaSyCcorJdwrFQp5HpR0she_r3PEVOj1TrUTI&path=43.323579%2C1.960141%7C43.317866%2C1.967716%7C43.318974%2C1.976428

Rahul
  • 1,380
  • 1
  • 10
  • 24
  • Thanks, that was the issue, but finally I use this library to get the route: https://github.com/jd-alexander/Google-Directions-Android.git more easy! – xmartinez Dec 12 '15 at 10:30