mapbox-svelte Svelte Themes

Mapbox Svelte

πŸ—ΊοΈ SvelteKit + MapLibre + PMTiles Viewer

This is a lightweight map viewer built with SvelteKit, MapLibre GL JS, and Protomaps PMTiles. It loads a local .pmtiles file and renders it with a clean vector style using protomaps-themes-base.


πŸš€ Features

  • Vector map rendering from a local .pmtiles file
  • 3D map tilt using pitch and bearing
  • Customizable map style
  • Fast development with Vite and SvelteKit

πŸ› οΈ Getting Started

1. Clone the repository

git clone https://github.com/clsulli95/mapbox-svelte.git
cd your-repo-name

2. Install dependencies

npm install

3. Start the development server

npm run dev

Visit: http://localhost:5173


πŸ“¦ Tech Stack


πŸ”§ Configuration

Edit src/lib/Map.svelte to:

  • Change map center, zoom, pitch, or bearing
  • Load a different .pmtiles file
  • Modify or extend the map style and layers

🧰 NPM Scripts

  • npm run dev β€” Run the dev server
  • npm run build β€” Build for production
  • npm run preview β€” Preview the production build

πŸ“„ License

MIT Β© Clint Sullivan


πŸ™‹ Questions?

Feel free to open an issue or start a discussion if you run into problems or want to contribute!

Top categories

Loading Svelte Themes