A SvelteKit 5 application for exploring georeferenced historical maps of Vietnam. Built with Allmaps, OpenLayers, and MapLibre for interactive visualization of heritage cartography overlaid on modern basemaps.
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
| Category | Technology |
|---|---|
| Framework | SvelteKit 5 (Svelte runes) |
| Language | TypeScript (strict) |
| Maps | OpenLayers 10, MapLibre GL 5 |
| Georeferencing | Allmaps (@allmaps/openlayers, @allmaps/maplibre) |
| Deployment | Cloudflare Pages |
| Build | Vite 7 |
src/
├── routes/
│ ├── +page.svelte # Map viewer
│ └── trip/+page.svelte # Trip tracker
├── lib/
│ ├── viewer/ # Annotation viewer components
│ ├── trip/ # GPS tracking & offline features
│ ├── map/ # Core map & annotation stores
│ └── layout/ # Layout primitives
└── styles/ # Global CSS & design tokens
| Variable | Required | Description |
|---|---|---|
PUBLIC_MAPTILER_KEY |
No | MapTiler API key for MapLibre basemap (falls back to demo tiles) |
Configured for Cloudflare Pages:
# Build
npm run build
# Local preview with Wrangler
npx wrangler pages dev .svelte-kit/cloudflare
//viewer) and trip tracker (/trip)npm run check before committing to verify TypeScript types$state, $derived, $effect)MapViewport.svelte file is large (~45k tokens) — use targeted editsid, label, color, hidden[Add license]