question

SreyasVoruganti-5995 avatar image
1 Vote"
SreyasVoruganti-5995 asked IoTGirl edited

Is there a way to make a multiple start/end point api request?

I have an application in which I have an array of objects each with start/end coordinates. I have to annotate each object in the array with the time/distance via walking between the start/end coordinates. This involves making an API call for every single object to this URL: http://dev.virtualearth.net/REST/v1/Routes/Walking?wayPoint.1={coordA}&wayPoint.2={coordB}&distanceUnit=mi&key=.... This is quite an expensive operation which has to be done quite a few times in my application. Is there a way I could make one API call with all the pairs of coordinates?

windows-maps
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

IoTGirl avatar image
1 Vote"
IoTGirl answered

If you are looking at the best route through a set of points, Distance Matrix (https://www.microsoft.com/en-us/maps/distance-matrix) might be a good option. Please note that it is 1 transaction for every 4 cells (https://docs.microsoft.com/en-us/bingmaps/getting-started/bing-maps-dev-center-help/understanding-bing-maps-transactions).

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.