Distances from "calculate a route" and "calculate a distance matrix" are different in Bing Maps API

Jonathan Ayala Marcelo 0 Reputation points
2024-05-09T15:10:23.8066667+00:00

I need to compute the distances of a given point with several others in their neighborhood. Initially, I used "calculate a route" and I think the results are reasonable. However, when I use "calculate a distance matrix" to save time, I obtain different distances (considerably) for some points. For example, consider these points:

Origin: -23.1683,-47.5817

Destination: -23.1529,-47.5404

Using "calculate a route":

http://dev.virtualearth.net/REST/v1/Routes/Walking?wayPoint.1=-23.1683,-47.5817&wayPoint.2=-23.1529,-47.5404&distanceUnit={'km'}&key={BingMapsKey}

Distance = 6.027km

Using "calculate a distance matrix"

https://dev.virtualearth.net/REST/v1/Routes/DistanceMatrix?origins=-23.1683,-47.5817&destinations=-23.1529,-47.5404&travelMode=Walking&key={BingMapsKey}	

Distance = 3.985km

(Note that the real route distance measured in the map is close to 6km)

I really want to use "calculate a distance matrix" for my calculations, but it looks that the resource is not so reliable. Please, if you have some alternative to solve my problem let me know.

Thank you

Windows Maps
Windows Maps
A Microsoft app that provides voice navigation and turn-by-turn driving, transit, and walking directions.
257 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.