I'm using Mapbox Matrix API for the first time. I'm trying to get the driving distance between two points:
Point A -105.044052,40.541783
Point B -105.43421,41.2337
My request is in this format:
https://api.mapbox.com/directions-matrix/v1/mapbox/driving/-105.044052,40.5417839;-105.434219,41.233714?sources=0&access_token=xyz
The response I'm getting is:
{"code":"Ok",
"durations":[[0.0,4687.2]],
"destinations":[
{
"distance":25.678536277,
"name":"Carlton Avenue",
"location":[-105.044287,40.541638]
},
{
"distance":199.410588356,
"name":"",
"location":[-105.436598,41.233736]
}
],
"sources":[
{
"distance":25.678536277,
"name":"Carlton Avenue",
"location":[-105.044287,40.541638]
}
]
}
My question is regarding distance results. The API says it returns all distances in meters. 199 meters is less than 1 mile. The two points should be around 80 miles apart. The duration of 4687 seconds sounds correct. That's 1.3 hours.
So why is the distance off?