Indy maps
Tags: maps, mapping, geo, polylines
Published: 2019-11-01 00:43:37

---
title: Indy maps
published: true
date: 2019-10-31 19:29:00 UTC
tags: maps,mapping,geo,polylines
canonical_url: https://adactio.com/journal/16058
---
*This was originally posted <a href="https://adactio.com/journal/16058" rel="canonical">my own site</a>, which is awesome.*

Remember when I wrote about [adding travel maps to my site](https://adactio.com/journal/15992) at the recent Indie Web Camp Brighton? I must confess that the last line I wrote was an attempt to catch a fish from the river of the lazy web:

> It’s a shame that I can’t use the lovely Stamen watercolour tiles for these static maps though.

In the spirit of [Cunningham’s Law](https://meta.wikimedia.org/wiki/Cunningham%27s_Law), I was hoping that somebody was going to respond with “It’s totally possible to use Stamen’s watercolour tiles for static maps, dumbass—look!” (to which my response would have been “thank you very much!”).

Alas, no such response was forthcoming. The hoped-for schooling never forthcame.

Still, I couldn’t quite let go of the idea of using those lovely watercolour maps somewhere on my site. But I had decided that dynamic maps would have been overkill for my archive pages:

> Sure, it looked good, but displaying the map required requests for a script, a style sheet, and multiple map tiles.

Then I had a thought. What if I keep the static maps on my archive pages, but make them clickable? Then, on the other end of that link, I can have the dynamic version. In other words, what if I had a separate URL just for the dynamic maps?

These seemed like a good plan to me, so while I was travelling by Eurostar—the only way to travel—back from the lovely city of Antwerp where I had been speaking at [Full Stack Europe](https://fullstackeurope.com/), I started hacking away on making the dynamic maps even more dynamic. After all, now that they were going to have their own pages, I could go all out with any fancy features I wanted.

I kept coming back to my original goal:

> I was looking for something more like [the maps in Indiana Jones films](https://www.youtube.com/watch?v=5TY5Fp6O5iM)—a line drawn from place to place to show the movement over time.

I found a plug-in for [Leaflet.js](https://leafletjs.com/) that animates polylines—thanks, [Iván](https://ivan.sanchezortega.es/)! With a bit of wrangling, I was able to get it to animate between the lat/lon points of whichever archive section the map was in. Rather than have it play out automatically, I also added a control so that you can start and stop the animation. While I was at it, I decided to make that “play/pause” button do something else too. Ahem.

If you’d like to see the maps in action, click the “play” button on any of these maps:

- [Everything from this August](https://adactio.com/archive/2019/08/map).
- [Links from June 2017](https://adactio.com/links/archive/2017/06/map).
- [Photos from October 2014](https://adactio.com/notes/photos/2014/10/map).
- [The entirety of 2018](https://adactio.com/archive/2018/map)—that might take a while.

You get the idea. It’s all very silly really. It’s right up there with [the time I made my sparklines playable](https://adactio.com/journal/12811). But that’s kind of the point. It’s my website so I can do whatever I want with it, no matter how silly.

First of all, the research department for adactio.com (that’s me) came up with the idea. Then that had to be sold in to upper management (that’s me too). A team was spun up to handle design and development (consisting of me and me). Finally, the finished result went live thanks to the tireless efforts of the adactio.com ops group (that would be me). Any feedback should be directed at the marketing department (no idea who that is).

*This was originally posted <a href="https://adactio.com/journal/16058" rel="canonical">my own site</a>, which is awesome.*