Matrix routing function not returning indices

Hello,

We are trying to implement matrix routing using matrixRouting function in web-sdk-services, however function is not returning “originIndex” and “destinationIndex” values in calculated routes. Is there an extra parameter to send to return these values?

Best regards.

Hi,
Matrix Routing service response reflects the order of origin and destinations that was submitted in the requests. Assuming we have origins: A, B, C and destinations 1,2 the response will have 3 rows with the following origin-destination route summaries: A1, A2, B1, B2, C1, C2.
You can check the structure of Matrix Response (Json example): Synchronous Matrix | Routing API and Extended Routing API.
Best regards,
Łukasz

1 Like