get-started-svelte-maplibre-gl-js

Get Started Svelte Maplibre Gl Js

Quick way to star a web map application with MapLibre GL JS using Svelte

Get started with Svelte and MapLibre GL JS

Quick way to star a web map application with MapLibre GL JS using Svelte.

A simple fullscreen map application as an example on how to use MapTiler maps together with Svelte and MapLibre GL JS for your own Svelte app.

  1. Clone this repo
  git clone https://github.com/maptiler/get-started-svelte-maplibre-gl-js.git my-svelte-map
  1. Navigate to the newly created project folder my-svelte-map

     cd my-svelte-map
    
  2. Install dependencies

     npm install
    
  3. :warning: Open the App.svelte file and replace YOUR_MAPTILER_API_KEY_HERE with your actual MapTiler API key.

:information_source: If you don't have an API KEY you can create it for FREE at https://www.maptiler.com/cloud/

  1. Start your local environment

     npm run dev
    
  2. You will find your app on address http://localhost:8080/. Now you should see the map in your browser.

Build With

Learn More

You can learn more at How to display a map in Svelte using MapLibre GL JS.

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Top categories

svelte logo

Want a Svelte site built?

Hire a Svelte developer
Loading Svelte Themes