0

I have this request https://maps.googleapis.com/maps/api/directions/json?key=<insert key>&origin=45.838768,16.014765&destination=45.839036,16.015213&waypoints=via:45.839052,16.014792&departure_time=now. It returns ZERO_RESULTS.

This is the same route in Google Maps https://www.google.com/maps/dir/45.838768+16.014765/45.839052+16.014792/45.839036+16.015213/@45.8389421,16.0145695,157m/data=!3m1!1e3!4m14!4m13!1m3!2m2!1d16.014765!2d45.838768!1m3!2m2!1d16.014792!2d45.839052!1m3!2m2!1d16.015213!2d45.839036!3e0!5m1!1e1

What am I doing wrong?

Luka Horvat
  • 4,283
  • 3
  • 30
  • 48
  • @geocodezip It's not a duplicate. Or in any case, the anwser there doesn't work for me because you need the via if you want to include traffic info. Also, the part of the documentaton that says I may get ZERO_RESULTS tells me nothing about what's wrong with my specific route or what I can do to avoid the issue. – Luka Horvat Dec 10 '18 at 14:02
  • With these coordinates you have to do a U-Turn maneuver which is not allowed with `via:` prefix. Have a look at https://stackoverflow.com/a/46061400/5140781. – xomena Dec 10 '18 at 22:54

0 Answers0