Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A http request to google maps api direction with waypoints

I'm working on an android app, using directions google maps api v2. It is said here that I can put, up to "8 waypoints" in my http request (I assume plus the origin and the destination points). So, my code generates the request below (I ordered it so you could count the number of waypoints).

https://maps.googleapis.com/maps/api/directions/json?origin=45.509166,-73.497897&destination=5.5027,-73.503455&waypoints=optimize:true| 45.509196,-73.495494| 45.511166,-73.493584| 45.515887,-73.500751| 45.516835,-73.507189| 45.51497,-73.514892| 45.507828,-73.515879| 45.504038,-73.516008| 45.508971,-73.505665| &sensor=false&API_KEY

This is the answer I get:

{
   "routes" : [],
   "status" : "ZERO_RESULTS"
}

Can one help me understand what is wrong? Does my request has an error, or I'm bypassing the limits of the direction google maps api?

like image 902
Maxime Claude Avatar asked Sep 15 '25 22:09

Maxime Claude


1 Answers

enter image description heremay your url is missing something change with this new url

https://maps.googleapis.com/maps/api/directions/json?origin=45.509166,-73.497897&destination=50.5027,-73.503455&waypoints=optimize:true|45.509196,-73.495494|45.511166,-73.493584|45.515887,-73.500751|45.516835,-73.507189|45.51497,-73.514892|45.507828,-73.515879|45.504038,-73.516008|45.508971,-73.505665|&sensor=false&API_KEY

like image 97
jeet parmar Avatar answered Sep 17 '25 13:09

jeet parmar