If you’re building an app that helps people shave time off their commute, plan their weekend workout, or optimize deliveries around town, Mapbox Directions can now help you plan those bike trips efficiently. It combines the speed of OSRM, the reliability of the Mapbox API, and the flexibility of OpenStreetMap data.
Bicycle navigation is tough. The fundamental routing algorithm is identical to driving and walking, but because there are so many ways to ride a bike there is never one right answer for getting from point A to B.
Cycling inside a city often involves a lot of local knowledge. Few cities are fortunate enough to have good bike path coverage and everyone has their own idea of why their favorite route is the best. Most people try to find a balance between convenience and safety. Are there bike lanes or a sidewalk I can use? Is the traffic moving fast? Do I need to take a large detour? Balancing all that is a challenge.
People also ride for fun, and speed cycling and mountain biking clearly have different routing preferences.
A mountain biker will have no problem on a rough track. A speed cyclist will try to stay on smooth well paved roads even if the road allows fast speeds and especially if the traffic is light.
With Mapbox Directions we aim to provide a solution that provides reasonable, safe routes in urban settings, while
still giving good results for longer biking trips.
Try your favorite bike route. Does the routing give you a different result than what you would expect?
Think about what makes your personal route better than this route.
Data like lane width, the presence of bike paths, the maximum allowed speed or road surface are invaluable for good bike routing.
This is where OpenStreetMap shines as it gives you the opportunity to contribute your local knowledge so other cyclists can benefit from it.
We will keep you posted as we roll out further improvements, like factoring elevation and traffic into the results.