Waypoint "providedIndex" wrong order

Hi, we are using TomTom routing API with Waypoints to optimize route (computeBestOrder=true)
however we gives a wrong provided waypoint order:

 <optimizedWaypoints>
    <waypoint providedIndex="0" optimizedIndex="1"/>
    <waypoint providedIndex="1" optimizedIndex="3"/>
    <waypoint providedIndex="2" optimizedIndex="0"/>
    <waypoint providedIndex="3" optimizedIndex="2"/>
    <waypoint providedIndex="4" optimizedIndex="4"/>
</optimizedWaypoints>

The providedIndex doesn’t follow the insert order in the call

Someone has the same issue ? Thanks for all.

regards

So the waypoints that you provided in the request are not presented in the same order (providedIndex) in the response?
Or did I get you wrong?

1 Like

that’s right, in my request i put this coordinates :

https://api.tomtom.com/routing/1/calculateRoute/44.728329%2C7.328768%3A44.648133%2C7.651727%3A44.745602%2C7.410263%3A44.649180%2C7.492654%3A
44.735747%2C7.527482%3A44.647765%2C7.325226%3A44.728329%2C7.328768%3A/xml?routeRepresentation=polyline&avoid=unpavedRoads&travelMode=car&computeBestOrder=true&routeType=shortest&key=*****

the route points are ok, but the summury it’s wrong:

<optimizedWaypoints
<waypoint providedIndex=“0” optimizedIndex=“1”
<waypoint providedIndex=“1” optimizedIndex=“3”
<waypoint providedIndex=“2” optimizedIndex=“0”
<waypoint providedIndex=“3” optimizedIndex=“2”
<waypoint providedIndex=“4” optimizedIndex=“4”
</optimizedWaypoints

providedIndex not match with insert order: for example providedIndex=“1” became optimizedIndex=“3”, but it’s impossible if you see the points on the maps (the route is correct) .
So i guess it’s wrong the providedIndex

Order of “optimizedIndex” items in “optimizedWaypoints” list show order of waypoints to be visited. In this case, waypoint 1 should be visited first, then 3, 0, 2 and 4 at the end. It is in line with the planned route.

Thank’s, it works !!!