How I Generate Maps on My Static Site With OpenLayers and Zola
✍️ • 🕑 • getzola • openlayers • cartography • technical details
For a long time, I wanted this website to have a “map” feature, where you could look at a nice, dynamic scrolling map of all of the places I visited.
Well, guess what! I’ve had one on the site since 11/11/21. You can find a map of all posts on the map page, or individual maps of posts in each series on any series page.
At first, I wasn’t sure how to get a map set up and working, and even once I got started writing the feature, I was still stuck for a fairly long time before I got it running. It’s still imperfect, and my code can get cleaned up, but it’s probably worth sharing for anyone else that tries to create something similar.
What follows are a bunch of code/implementation details, specifically related to my choices of the Zola static site generator and OpenLayers javascript map library.