This pack was inspired by another project of mine that uses of several Mapbox APIs to define and visualize service areas. Since I was already using Coda for project management it felt like a fitting challenge for the Coda Packathon. To demonstrate the pack I've attempted to mirror all 5 of Mapbox's API playgrounds within a Coda doc.

What it does

This pack integrates features across the Accounts, Maps, Navigation, and Search Mapbox APIs. You can add geocoding features to your docs to get coordinates for a given place name or vice versa. This pack allows you to look up directions between up to 25 way-points or generate isochrones based on time or distance. You could create a static image with overlays or embedded map showcasing the results of the above functions. If you are a Mapbox Studio user you can use this pack to view and edit custom styles, tilesets, datasets, and features.

How we built it

This project is written in TypeScript and is tightly integrated with the Coda Packs SDK. I made use of a local development environment and added test coverage for all published Formulas/Sync Tables/ Actions.

Challenges we ran into

The biggest challenge in launching this pack has been mirroring the Mapbox APIs as closely as possible. A positive result of this approach is lots of functionality but It also lead to some fairly large formulas and a steeper learning curve to get the most out of this pack.

Accomplishments that we're proud of

I am particularly proud of abstractions used around Parameters and Fetcher to keep the code base DRY and enforce best practices for error-handling and validation. There is also some clever usage of autocomplete found across formulas that should make this pack more delightful to use.

What we learned

I learned so much building this pack, and at many time worried that I had bitten off more than I could (proverbially) chew. The biggest lessons came from learning the Coda SDK, which I had not used prior to this challenge. On the whole I really enjoyed using this SDK and appreciate a lot of the features it has around security, though it is certainly more limiting on the UI/controls side within docs.

What's next for Mapbox Pack

I want to harness user feedback to iron out kinks and bugs with this core functionality, there are so many permutations of these formulas there will be some edge cases. I also want to improve the user experience to hide as much complexity as possible. If the core is solid and offers a good enough user experience I would like to start monetizing this pack, as long term support is something I'd like to provide. There are also many more features that can be added around studio projects, geospatial analysis (with Turf.js), and navigation APIs.

Built With

Share this project: