Dear Frederik Kjær Grote, thank you for reporting the issue with the routeSummariesOnly and I am sorry to hear that you are running into an issue with the travel cost. There is already a workaround provided in the comment thread of this post to use routeAttributes as "all" or default. You can also use "routepath" as an alternative. When requesting "routeSummariesOnly" which is a low latency algorithm to return the travel cost, it is not honoring the avoid ferry route preference in combination with the optimize distance. The travel distance and time you are getting back is for the driving+ferry route and not the straight-line distance between the start and end location. The default route attribute honors the avoid ferry and returns the travel cost for the driving only route, so you see the difference in the travel distance and time. We have added this defect to our backlog and will address it. Faraz
Why does Bing MAP API return wrong distance when using routeSummariesOnly?
Frederik Kjær Grote
0
Reputation points
When I apply the routeAttributes=routeSummariesOnly, the result deviates drastically from the results I get otherwise.
When I look up
(Key has been removed so the link does not work without a new key)
The first returns a distance of 169.047 km while the second returns (the correct) 331.026 km distance. The two are completely identical with routeSummariesOnly being the only difference.
Why does routeSummariesOnly return a different (and wrong) result?
1 answer
Sort by: Most helpful
-
Faraz Siddiqui 90 Reputation points Microsoft Employee
2023-04-06T22:04:59.8933333+00:00