mapbox / mapbox/mapbox-directions.js

Driving Durations are off

Open
#116 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
58
Forks
21
PR merge metrics
No merged PRs in 30d

Description

We have noticed that there are often large discrepancies in the driving times when compared to for instance Google Maps / Bing Maps.
For instance, driving this part of the Trans-Canadian highway:

https://www.google.com/maps/dir/52.8683972,-118.0816962/52.9762822,-119.4175245/@52.9342288,-118.8057009,10z/data=!4m2!4m1!3e0
Takes 1h 4m.

http://map.project-osrm.org/?z=15&center=52.987756%2C-119.397440&loc=52.868845%2C-118.078823&loc=52.977124%2C-119.417267&hl=en&alt=0
1h 12m.

https://api.mapbox.com/directions/v5/mapbox/driving/-118.076973%2C52.869235%3B-119.413579%2C52.976750.json
6655.2 seconds or 1h 51m! Which averages to 56km/h.

What is causing this difference? Is there something we can do to get more accurate numbers?

P.s. I'm not sure if this is the right place for this kind of issue, if not, can someone please point me in the right direction?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the linked Google Maps, OSRM, and Mapbox Directions API routes and durations for the stated coordinates. Investigate why the results differ and determine whether the discrepancy is caused by routing data or this project. Done means documenting the cause and whether an actionable accuracy fix exists.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.