Mapbox is now supporting Trail Router via their community programme

Published 2020-06-06

Background

Trail Router relies on Mapbox for all of its mapping functionality. The base map is a customised version of the Mapbox Outdoors map, tweaked via Mapbox Studio. The options in Trail Router to display hiking routes and lit streets are also powered by Mapbox layers, created via custom tile sets.

Sudden growth and a nasty surprise

In mid-May, I mentioned Trail Router in a post on Hacker News and I was pleasantly surprised by the large amount of positive feedback I received. Approximately 10,000 users tried out Trail Router that day, and they generated more than 30,000 routes between them.

However, the following day I received an email alert from Mapbox that I had exceeded my free mapping allowance. When I logged in to check the statistics, I found that I'd exceeded it in quite spectacular fashion: Trail Router had requested more than one million tiles in a single day! The free monthly allowance is 200,000. This left me with a rather large bill that the project could not afford to pay. I was acutely aware that usage (and therefore fees) were continuing to grow even as I looked at these statistics.

First contact with Mapbox

I contacted Mapbox support in the hope that they'd be willing to provide some discount or credit, given that Trail Router is a non-profit project. Joe, from the Mapbox billing team, responded quickly and immediately provided a two month coupon without me even asking. This zeroed the large bill and gave us breathing room to find a long term solution to the increased usage. This was fantastic and a huge relief!

Joe also helped steer me towards Mapbox GL JS. Mapbox GL JS is uses vector data rather than tile images to render maps. This has a variety of technical benefits, but also comes with significantly more favourable commercial terms: Mapbox charge usage of Mapbox GL JS by page load, rather than tile load. A free allowance of 50,000 page loads is included, regardless of how many tiles a user fetches during that session. I was able to modify Trail Router to use Mapbox GL JS via the mapbox-gl-leaflet plugin.

However, at the current rate of growth it looked like Trail Router would soon exceed 50,000 page loads per month.

Mapbox Community

I read about Mapbox Community and their support for positive impact projects around the globe. Given that Trail Router is a non-profit project and is being provided for free to the running community, I thought there was a chance that Mapbox might be willing to support it. Specifically, I was hoping for some discount or cap on fees that would allow Trail Router to continue to grow.

I contacted Mapbox Community and less than 24 hours later received a reply from Mikel. After a short email exchange, Mikel confirmed that Mapbox would admit Trail Router to their community programme! This would provide Trail Router with free map loads beyond the free allowances.

Conclusion

Mapbox's support for Trail Router allows us to continue to grow and promote its usage without the worry of large bills coming in. It also gives us the freedom to incorporate more of Mapbox's features into Trail Router (such as additional map styles).

I am extremely grateful to Mapbox for their support, and in particular would like to thank Joe Clark and Mikel Maron for their help. The support received from Mapbox throughout was first class, and I'd have no hesitation in recommending them to others looking for mapping solutions.