LoreMaps is an attempt to help organize information on fantasy maps.
Interactive atlases for fantasy worlds: pan and zoom across tiled map images, search for places, measure travel distances, overlay a hex or square grid — and open the lore behind every marker, fetched live from the community wikis.
This is a from-scratch rewrite of the original ASP.NET MVC site
(aspnet-mvc-live branch)
as a fully static site.
- Astro — static site generation, zero JS outside the map runtime
- Leaflet 1.9 — the only runtime dependency; every plugin the old
site used (draw, search, sidebar, rastercoords, turf hexgrid) has been replaced with
small dependency-free TypeScript modules in
src/lib/ - Map tiles are gdal2tiles XYZ pyramids served from GitHub Pages (same tiles as the old site)
- POI content is fetched at runtime from MediaWiki APIs via CORS (
origin=*) — no JSONP
npm install
npm run dev # http://localhost:4321
npm run build # static output in dist/
npm run preview # serve dist/
npx astro check # typecheckEverything is driven by MapDefinition (see src/lib/types.ts): a JSON-serializable
description of a map — image size, tile URL, meters-per-pixel scale, POI layers, and a
content source. The Leaflet runtime (src/lib/fantasy-map.ts) is map-agnostic and only
consumes that shape.
src/maps/ map registry: one MapDefinition per map (faerun, got)
src/lib/ map runtime: raster coords, search, measure, grid, panel, scale, units
src/lib/content/ pluggable content providers (MediaWiki adapter + sanitizer)
public/data/ POI GeoJSON per map; Point coordinates are image pixels [x, y]
src/pages/ landing page + /maps/[id] generated from the registry
- Generate an XYZ tile pyramid from your map image (
gdal2tiles.py --xyz -p raster ...) and host it anywhere with CORS. - Drop POI GeoJSON files under
public/data/<id>/(Point features, pixel coordinates, anameproperty per feature). - Add a
MapDefinitioninsrc/maps/and register it insrc/maps/index.ts.
- User-uploaded maps —
MapDefinitionis plain JSON, so uploaded maps are just stored definitions + tiles; the runtime already renders any definition it is handed. - POI content authoring / offline snapshots — implement the
ContentProviderinterface (src/lib/content/provider.ts) and register the new source type; the wiki adapter is one such provider, a static or user-authored source slots in beside it. - Fog of war — the grid overlay shows the pattern: self-contained Leaflet control +
layer modules attached in
fantasy-map.ts; a fog overlay would be another such module.
- Faerûn map image by Pocket Plane Group; lore from the Forgotten Realms Wiki
- Known World map by serMountainGoat (CC-BY-NC-SA); lore from A Wiki of Ice and Fire
- Raster coordinate approach based on leaflet-rastercoords by commenthol





