Android Question [SOLVED] waypoint_order change everytime

yfleury

Active Member
Licensed User
Hi All.
I have a to trace the best route between start and end destination with many waypoint.

The polyPoints (points) draw perfectly on google map

I have a xcustomListView to show all address

I want to use waypoint_order to show all address in order for fellowing the way

But each time I request a directions, the waypoint_order change. So I can't use it to order my address list in xcustomlistview.

Why waypoint_order change every time I send a direction request?

My link to api is
https://maps.googleapis.com/maps/api/directions/json?origin=48.883723010563514,-72.25161105394365&destination=48.88727273633094,-72.24676564335823&waypoints=optimize:true|48.88726259524613,-72.2477|48.88514460666182,-72.2462|48.888403233934966,-72.2454|48.88666382668003,-72.2445|48.88471182664437,-72.2449|48.88356779663192,-72.2519|48.88696850289201,-72.245|48.88380590871599,-72.2454&mode=driving&language=fr&units=metric&transit_routing_preference=less_walking&key=AIzaSyARqIiZ_R_xxxxxxxxxxxxxxxx
 

yfleury

Active Member
Licensed User
Find my programing error. I select (db) all address ordered by destinationID then it change order of lat/lng for api request. Of course, waypoint_order change each time I request direction. I work on that over 11 hours in 2 days.

I am too near of tree to see all the forest.
 
Top