\

Show HN: An interactive map of Tolkien's Middle-earth

283 points - last Tuesday at 8:42 PM


An interactive map of Tolkien’s Middle-earth, with events from across the legendarium plotted as markers.

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.

Source
  • frasermarlow

    yesterday at 12:35 PM

    PS: There have been a few questions about the tiling system used. It's based on https://leafletjs.com/ and you will find it all in the Github repo. Its one of the more interesting parts of the project:

    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.

      • ComSubVie

        yesterday at 2:46 PM

        The generated satellite tiles are interesting. The sea is very dry. And some mountains are looking very strange. At least for some places (e.g. Mount Doom) the AI should have been able to generate more "realistic" images.

        Interesting project. I might "steal" that for teaching purposes.

          • frasermarlow

            yesterday at 3:55 PM

            Ha ha. Yeah. That was a first wild attempt. If I get time I will figure out how to fine tune the mock-satellite imagery to properly reflect ocean, lakes, trees, castles etc.

        • Prime_Axiom

          yesterday at 2:04 PM

          This is pretty cool man, I appreciate you sharing what you did on GitHub. I’m just a codelet script kiddie crashing around the Google Maps api for fun and I love seeing projects like this.

            • frasermarlow

              yesterday at 3:54 PM

              If you put in a credit card, look out, the Google maps API can get very expensive very quickly!

      • aquir

        yesterday at 6:59 AM

        It's great but it's the Map of Middle-Earth in the Third Age, right? During the First and Second Ages Middle-Earth looked very different and this makes showing events from the Silmarillion for example very confusing.

          • frasermarlow

            yesterday at 12:38 PM

            Yep, that is correct, well spotted. See the thread with blevinstein below on some more details related to that.

        • xg15

          yesterday at 11:58 PM

          This is really cool!

          Some nitpicks/ideas:

          A few of the markers seem to be misplaced. I just noticed with the Cirith Ungol markers and Henneth Annûn, which are too far north and east compared to their location in the books (Cirith Ungol should be more or less directly above Minas Morgul; Henneth Annûn would be closer to the riverbank I think and in any case definitely not inside the mountain range)

          There is also a bit of a mix of different semantics with the markers, I think. I see at least three different categories: Book plot lines, historical events and locations. The Hobbit and LotR markers seem to be mostly the first category, Silmarillion the second and Appendices the last (but not always). This makes sense, but is also a bit confusing, as a lot of locations only have book chapter or event descriptions, but no distinct description of the location itself. Some locations also have multiple markers if multiple things happened there.

          I wonder if this could be structured a bit more, e.g. a marker for each location, with text subsections or "sub markers" for events and plotlines in that location.

          Also, why the map looks good, I'd experiment with a few different ones (like the one from the books) that are more detailed. E.g. in this map, most of the roads are missing, which makes the markers for Tharbad or the Crossroads a bit awkward.

          The crowning achievement would be of course to integrate Karen Wynn Fonstad's "high-resolution" maps from the atlas - but I imagine copyright makes that impossible.

          The satellite view is a really cool idea, but, as others have said, doesn't reall work right now.

          (I think this might be an interesting LLM benchmark: How well can a model generate a satellite view of middle earth that is both accurate to the map and to the descriptions in the books - e.g. not putting any vegetation into Gorgoroth, depicting the various ruined cities as ruins, etc)

          But in any case, it's a really fun and well-designed project.

            • frasermarlow

              today at 1:11 AM

              Thanks for the thoughtful feedback. Yes, i literally threw the faux-satellite version together in response to suggestions on this thread. Plenty of room for improvement there! Thanks for the notes on marker positioning. Let me look into that. Each source map has its pros and cons, but Fonstad's canonical version would be ideal. Copyright could be an issue as you point out.

          • starkparker

            yesterday at 5:55 PM

            LotrProject[1] has several interactive maps and visualizations, including a family tree, time/distance chart of the fellowship's journey, maps of Beleriand and Middle-Earth, historical timeline maps, and demographic posts on Middle-Earth's inhabitants. Sadly doesn't seem to have been maintained recently, the cracks in WordPress are starting to show, and AFAICT the source content isn't open.

            http://lotrproject.com

              • frasermarlow

                yesterday at 7:56 PM

                Thanks, I will check it out. Good news is, web hosting tech aside, the content should not go out of date!

                  • frasermarlow

                    today at 1:22 AM

                    Ugh, yeah, I see what you mean - much of the project is running into backend errors.

            • ivolimmen

              yesterday at 6:12 AM

              The first thing that poped in my head when seeing this: it must have taken quite some time to thoroughly go thought all this to make it. The developer must have a huge passion for LOTR. Seeing all the message that it was build using AI it hugely deminishes this feeling. Still a very nice looking map.

                • frasermarlow

                  yesterday at 5:25 PM

                  I totally get that. Sorry if it was a letdown. In reality I built this map as part of a personal exploration of the lore and background of Tolkien's lore, because i am fascinated by it. This felt like a productive way to share my learnings with others in a fun way. I certainly learnt a lot from going through the process.

                  • cheschire

                    yesterday at 10:10 AM

                    LLMs are a sum of their parts. Whatever feelings you had towards OP can still be given freely to the creators of the parts.

                • topherjaynes

                  last Tuesday at 10:57 PM

                  One doesn't simply vibe code into Mordor!(but seriously love this)

                    • frasermarlow

                      yesterday at 4:00 AM

                      LOL

                  • nc1zdev

                    today at 5:04 AM

                    This is so cool, I love it. Probably need to enhance the rendering so it doesn't feel as laggy when panning or zooming. But still amazing

                    • starwalkn

                      today at 8:38 AM

                      Thanks for the work! It looks very good, it's a pity that it wasn't there when I read Tolkien the first 2 times.

                      • yesterday at 11:05 PM

                        • block_dagger

                          yesterday at 10:52 AM

                          Interactive is generous - more like labeled. Interesting but was expecting more.

                            • frasermarlow

                              yesterday at 12:32 PM

                              Open to ideas on how more 'interactive' we can make it. But yeah, fair point. Maybe it's just more 'annotated'

                          • bananaflag

                            last Tuesday at 9:37 PM

                            I notice the map is the one from the movies (it shows the Orocarni a bit too close, but it's nice they appear on the map).

                            Maybe 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.

                              • frasermarlow

                                last Tuesday at 11:49 PM

                                Hey thanks. Good call, I will have Claude figure out the years for each event that can be pinned down.

                            • shdh

                              last Tuesday at 10:34 PM

                              Using a tile server for this feels hilarious

                                • frasermarlow

                                  yesterday at 12:36 PM

                                  I added a comment above about the use of https://leafletjs.com/ if you are interested.

                              • tuom1s

                                yesterday at 8:03 AM

                                This is amazing, and only recently I started to read the books. So this map will actually be handy to follow through the story!

                                • balajeekalyan

                                  last Tuesday at 11:30 PM

                                  Wow! this is so detailed. You are putting vibe-code to genuine use.

                                    • frasermarlow

                                      last Tuesday at 11:48 PM

                                      Best use case I have found so far :-)

                                  • Pooge

                                    yesterday at 3:15 PM

                                    And all this without OpenGL! Kudos.

                                    My new favorite insult towards web services that are badly done is: "even fully vibe-coded Codex would've done better".

                                    • frm88

                                      yesterday at 8:20 AM

                                      This is awesome, thank you. I will play around with this all day :)

                                      • blevinstein

                                        yesterday at 1:00 AM

                                        Arda was supposed to be drastically changed after the First Age. This map is from the Second/Third Ages. Do the events from the First Age map currently into what is shown? Do some have to be excluded?

                                          • frasermarlow

                                            yesterday at 1:17 AM

                                            Well I included 13 Silmarillion events, but most are actually Second Age events that map perfectly fine. Three of them are First age so it's a bit fudgy. The project has no Beleriand events... they literally cannot be placed because Beleriand sank beneath the sea after the War of Wrath. Cuiviénen it tricky. The Sea of Helcar where it sat was reshaped when Morgoth's strongholds were taken out, so that is approximate. Would love to make age-appropriate (ha ha) maps, but I only had this one to work from.

                                              • sjdv1982

                                                yesterday at 7:47 PM

                                                Nice map!

                                                The First Age / Second Age boundary is not unlike the K/T boundary...

                                                Compared to that, Second Age / Third Age isn't that different (places like Dunland and Tharbad were forested, according to Treebeard). So if you wish to make the map a bit more ageless, you could just add a few alternate names. - Dol Guldur was Amon Lanc in the Second Age - Lothlorien was Laurelindorenan in the Second Age - Mirkwood, Minas Tirith and Minas Morgul are late-Third-Age-isms too.

                                        • chantaiman_fnf

                                          yesterday at 6:45 AM

                                          Wish I had this thing when I was young. Like... 25 years ago? lol I had to turn back to the map page over and over... Thanks for the work!

                                          • twostorytower

                                            last Tuesday at 10:29 PM

                                            This is awesome! Can you make the zoom in and out smoother? I have to pinch every single time to get to the next zoom level instead of continuously zooming as I pinch.

                                              • frasermarlow

                                                last Tuesday at 11:50 PM

                                                Yep, that zoom thing is a bit fiddly on mobile in particular. I will see what I can improve.

                                            • jcstryker

                                              yesterday at 4:29 AM

                                              Great work! A window into one of the most important universe we have created.

                                              Any chance you would be willing to share the source code?

                                            • pants2

                                              yesterday at 12:55 AM

                                              Would love just for fun to feed this through an image generator to make it look like satellite imagery or maybe even Google Maps.

                                                • fatcullen

                                                  yesterday at 2:18 PM

                                                  Not related to this project but you might like this map from the ArdaCraft project https://www.micahvanderlugt.com/middle-earth-3d

                                                  • frasermarlow

                                                    yesterday at 4:48 AM

                                                    Hey @pants2, I put something together for you. It's pretty rough, but if you take the time to respond here, that will be the motivation I need to clean this up and make it work properly. https://middle-earth-interactive-map.web.app/index.html?view...

                                                      • pants2

                                                        yesterday at 6:18 PM

                                                        Hi @frasermarlow, this is a nice start! Of course the water here is land which is an issue, but I think it's fun. I think the brown color of the map made it all desert when it should probably be more New Zealand - like. Might not be super doable with img2img but I'll definitely check out any other attempts!

                                                          • frasermarlow

                                                            yesterday at 7:59 PM

                                                            Yep. When I get some time I will do a metadata layer to clarify water vs land vs prairies vs forest etc... then I will rerun the process with that additional Context. Should be fun. Thanks for the suggestion.

                                                        • timvdalen

                                                          yesterday at 6:09 AM

                                                          Oof, zooming in on Fangorn Forest set off my trypophobia!

                                                      • frasermarlow

                                                        yesterday at 1:21 AM

                                                        The original map was found here: https://www.reddit.com/r/lotr/comments/18fy0ga/middleearth_m... - give it a whirl!

                                                    • randomeel

                                                      yesterday at 5:49 AM

                                                      Amazing ! But it did kind of spoil the rest of the books since i am reading LOTR for the first time...

                                                        • frasermarlow

                                                          yesterday at 12:24 PM

                                                          Ah. Yeah sorry. I could add a "spoiler alert!"

                                                      • strider_2018

                                                        yesterday at 1:07 AM

                                                        I made an account just to say thank you. Really great work. I would love to see a map of the first age events.

                                                          • frasermarlow

                                                            yesterday at 3:03 AM

                                                            If I can find the right source materials, then challenge accepted.

                                                        • kilbey1

                                                          last Tuesday at 11:10 PM

                                                          Mad respect; I've been working on building maps and it's a LOT harder than it might seem.

                                                            • frasermarlow

                                                              last Tuesday at 11:52 PM

                                                              Honestly the hardest thing for this was getting the pins in the right place. I had Claude create a tool for me to get the location and have it correct placements. Even after a dozen 'pins' were on the map, it still had problems placing the next pin (relative to the ones it had). Claude has gotten better and honestly I had not figured out Claude in the browser when I built this.

                                                          • bdeol22

                                                            yesterday at 1:51 PM

                                                            The tiling pipeline is the easy part to underestimate; documenting how you sliced and served zoom levels is genuinely useful for anyone doing map-style UIs. Nice work.

                                                            • imwally

                                                              yesterday at 1:19 AM

                                                              Anyone know a decent place where I can buy a giant print of this for my wall?

                                                                • frasermarlow

                                                                  yesterday at 1:35 AM

                                                                  Good question. Check out Reddit - that is where I found the original. I understand it was made for the movies but I have not been able to locate the exact source or a place to order it from.

                                                            • 4ndrewl

                                                              yesterday at 6:25 AM

                                                              Looks really nice. There are tons of interactive Middle Earth maps, but this looks really polished.

                                                              Did the LLM suggest using some pre-existing standard like MBTiles for the tiles?

                                                                • frasermarlow

                                                                  yesterday at 12:36 PM

                                                                  I added a comment above about the use of https://leafletjs.com/ if you are interested.

                                                              • vldszn

                                                                yesterday at 1:38 AM

                                                                Looks very good! Thank you

                                                                  • frasermarlow

                                                                    yesterday at 1:48 AM

                                                                    Thanks. Being on Hacker News is fun. But it turns out to be expensive too if your project takes off and Firebase charges for downloads!

                                                                • devcraft_ai

                                                                  yesterday at 8:30 AM

                                                                  [dead]

                                                                  • zhichuanxun

                                                                    yesterday at 5:12 AM

                                                                    [dead]

                                                                    • ffwebmaster

                                                                      yesterday at 2:16 PM

                                                                      [dead]

                                                                      • freakynit

                                                                        yesterday at 3:18 AM

                                                                        As much hate as vibe-coding gets (and most of it is justified), it has also allowed all of us to vibe-code our thoughts to small single-page web apps very easily.

                                                                        Shameless vibe-coded plugs for my own regular usage:

                                                                        1. https://llm-token-cost-calculator.pagey.site/

                                                                        2. https://metrics-memory-usage.pagey.site/

                                                                          • emaro

                                                                            yesterday at 7:01 AM

                                                                            I don't mind people sharing their plugs about related things, but don't you think the connection here is a bit far-fetched?

                                                                            Imo we're past the point where being vibe-coded is an interesting link. This is a thread about an interactive map of middle earth — not about vibe-coding, token usage or anything like it. Imagine if everyone posted their vibes projects now...

                                                                              • freakynit

                                                                                yesterday at 7:59 AM

                                                                                You're right. I got too excited to share. Couldn't delete now because of HN rule (1 hour), but will keep in mind. Thanks..

                                                                            • helloplanets

                                                                              yesterday at 8:36 AM

                                                                              Whatever you're using as your visual templating instructions, I like it. Mind sharing?

                                                                              Been using a slightly modified Tufte template for my vibed small apps, but this is much better.

                                                                                • frasermarlow

                                                                                  yesterday at 5:27 PM

                                                                                  I added some notes above on the tiling technology. As for the base map itself I posted a link to the original file. I hope that helps but happy to answer any other questions you might have.

                                                                              • frasermarlow

                                                                                yesterday at 3:59 AM

                                                                                Yeah, for sure. Vibe coding has it's place, I think. It's the people who pretend to build production-ready systems that are just hollow shells that give it a bad name. It is what it is. I vibe-coded this game and I take pride in it: https://frasermarlow.github.io/vibe-star-chase/

                                                                                  • freakynit

                                                                                    yesterday at 6:11 AM

                                                                                    yep.. vibe-coding works, but, only up to a certain housands of lines of code max, that too, with bigger models.. beyond that, it starts to make absolutely stupid mistakes and starts to screw up with the architecture and general layout of the project all while leaving huge security holes. You need to guide it beyond that.