Step 1: Understand the Problem
Talk about what the site is, what it will do, what it will need.
Step 2: Brainstorm solutions
Think about how to best approach the problem. I was put in charge of the map only, not the rest of the site. So, I couldn’t build the map data functionality into the site theme (especially since it was using a theme builder – not ideal). So, I decided to make a plugin that would handle the data. The actual map would be built within the theme.
Step 3: Build the plugin
This took a while. It was my first plugin, and a bit of a complicated one at that. It uses the WordPress HTTP API to send, update, and delete data from a Mapbox dataset. It allows for 3 custom fields and sending categories and tags as well as general post information, like the GUID. I have a lot more ideas for plugin features, but those weren’t necessary for this project.
Step 4: Build the map
This was a bit more difficult than the plugin, unexpectedly, because the Mapbox Datasets API is well-written and easy to use; the Mapbox GL JS documentation is poorly written and very difficult to use and understand. Their examples are mildly helpful if your use case exactly matches their example. Otherwise, it kind of sucks.
This had four parts: display the map with the points, color the points by historical segment, filter the points by year, and filter the points by category.
Step 5: Upload the real deal data
Working on this one.