Show HN: An interactive map of Tolkien's Middle-earth (middle-earth-interactive-map.web.app)
I have been commuting a fair bit between the East and West coast, and thanks to American Airlines' free onboard WiFi, I was able to vibe-code a full interactive map of Middle-earth right from my economy seat at the back of the bus.
It's rather amazing how much an LLM knows about Tolkien's work, and it was fun to delve into many of the nooks and crannies of Tolkien's lore.
Some features: - Plot on the map the journey of the main characters in both The Hobbit and The Lord of the Rings. - Follow a list of events in the chronological Timeline - Zoom in on the high-def map and explore many of the off-the-main-plotline places - Use the 'measure distances' feature to see how far apart things are.
I also had a lot of fun learning about tiling to allow for efficient zooming.
If you are anything like me, this should provide a fun companion to reading the books or watching the movies (note that on this site, I followed the book narrative, and did not include Peter Jackson's many departures)
If you get the chance to check it out, I would love more feedback, and if there is demand, I might do the same for Game of Thrones.
35 comments
[ 4.2 ms ] story [ 50.4 ms ] threadMaybe when describing historical events you should also put the year (it is given only for some of them).
Anyway, very nice work! I think it's appropriate especially for casual fans (especially movie fans) to delve (sorry) deeper into the lore.
Shameless vibe-coded plugs for my own regular usage:
1. https://llm-token-cost-calculator.pagey.site/
2. https://metrics-memory-usage.pagey.site/
Any chance you would be willing to share the source code?
Did the LLM suggest using some pre-existing standard like MBTiles for the tiles?
https://github.com/frasermarlow/middle-earth-map
The tiles were pre-generated from the source image using generate_tiles.py — a Python script that slices the big map into 256x256 JPEG tiles at three zoom levels . Leaflet loads them with zoomOffset: 2, so directory zoom 0 = Leaflet zoom -2, directory zoom 2 = Leaflet zoom 0 (the highest native zoom). Below and above that range, Leaflet scales tiles up or down automatically.
The satellite tiles were generated by generate_sat_ai.py using Stable Diffusion img2img. It assembles the zoom-2 tiles into a full image, processes 512x512 overlapping patches through SD, blends them back together, then slices into the tile pyramid.
Interesting project. I might "steal" that for teaching purposes.