Indy maps

Remember when I wrote about adding travel maps to my site 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, 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, 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—a line drawn from place to place to show the movement over time.

I found a plug-in for Leaflet.js that animates polylines—thanks, Iván! 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:

You get the idea. It’s all very silly really. It’s right up there with the time I made my sparklines playable. 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).

Have you published a response to this? :

Responses

Marty McGuire

🤩 Loving these maps! I missed your comment about using the stamen tiles for static maps.

I use https://github.com/dfacts/staticmaplite on my site. It’s no longer under development but, as long as you point it at a working tilemap server, it works fine! I switched out the URLs hardcoded in the PHP file for the Stamen “Toner” tiles, using the tile server URL pattern on the Open Street Map wiki.

Bramus!

Reminds me of this visualization I made for Gowalla (RIP) back in the day: vimeo.com/35689394 No watercolor tiles though ;)

# Posted by Bramus! on Thursday, October 31st, 2019 at 10:24pm

2 Likes

# Liked by New Adventures on Thursday, October 31st, 2019 at 10:05pm

# Liked by Dominik Schwind on Saturday, November 2nd, 2019 at 1:13pm

Previously on this day

2 years ago I wrote Speak and repeat

The lifecycle of a conference talk.

8 years ago I wrote Carpenter

I have come here to watch an all-night movie marathon and chew bubblegum. And I am all out of bubblegum.

15 years ago I wrote Let sleeping iPods die

After a Friday afternoon meeting over at Semantico, I decided to swing by the local Cancom shop and browse through whatever Apple goodies they might have in stock.

17 years ago I wrote The Pumpkin Queen

Not only does Jessica carve a scary looking Jack O’Lantern, she also makes a mean roasted garlic pumpkin bisque with herb potato dumplings.

18 years ago I wrote Bairin Breac

A quick update to my previous entry: I found a recipe for that cake.

18 years ago I wrote Halloween

Happy Halloween.