I’m using Route Optimization API in my project, and I would like to know how to access in someway the points ordered after optimization. What I need is to get the lat,lon couple of the points that I have added to the request, ordered according to the optimization, 'cause I want to show them on the map with a popup marked with the order number they “received”.
I’ve read this part of documentation looking for a useful output parameter and, apart from
paths.points_order that gives me the new order of points, I couldn’t manage to find anything else, or how to use parameters. I’ve only found
paths.snapped_waypoints that could be the ones to give me the ordered infos, but I’m not sure which one I should use and how. I’ve tried setting
false in the request, since in the docs they say:
If points_encoded=true or no points_encoded specified an encoded string will be returned, otherwise an array with order [lon,lat,elevation] is returned.
But I don’t know how to access this information to achieve what I want, and which between points or snapped_waypoints I should use
I’v tried this query:
In the result I have a lot of lat,lon couple inside the “points” array, and just 3 out of 4 points specified in snapped_waypoints, that aren’t even the points I’ve specified. What do these results represent? Apparently I can’t use them to achieve my objective.