Forum Discussion

PanosT's avatar
PanosT
Copper Contributor
Mar 04, 2025

Azure Maps computeBestOrder=true returns wrong originalWaypointIndexAtEndOfLeg values

Hi. 

I am trying to create a module where clients can optimize their routes using the Azure Maps service using DevExpress Map Control v24.2.5

 

Unfortunately when parsing to Azure Maps service computeBestOrder=true (regardless the RouteType) the JSON back has errors when sets the values for originalWaypointIndexAtEndOfLeg which DevExpress translates, which means cannot keep actual track of the changes in the route. 

Example. 

computeBestOrder=true

routetype=shortest

query=

while the list of the Legs is correct, the originalWaypointIndexAtEndOfLeg property is not. 

 

So according to the JSON results from the API

(the system ignores Origin and Final Destination so is 0 based list of Waypoints)

0 -> 3 (Is true)
1 -> 2 (Is false, is actually 1 -> 4)
2 -> 0 (Is false, is actually 2 -> 2)  - example bellow


3 -> 1 (Is true)
4 -> 4 (Is false, is actually 4 -> 5)

 

That could have been an non issue if at the same time Azure wasn't truncating the Lat/Lon values, which the rounding is not simple Math.Round 5, so cannot get a meaningful way to build back the changes to the route and apply the correct location labels. 

Is there something wrong with the service or the interpretation by myself and DevExpress is not correct when reading the originalWaypointIndexAtEndOfLeg values?

 

If you have any queries, ορ requiring more information please let me know. 

Thank you. 

 

No RepliesBe the first to reply

Resources