An open API service indexing awesome lists of open source software.

https://github.com/anzhi0708/svelte-5-leaflet-example

An Example of Drawing a Map with Svelte + Leaflet
https://github.com/anzhi0708/svelte-5-leaflet-example

css example example-code example-project geocoding geolocation hello-world leaflet leafletjs map npm svelte svelte-template sveltekit

Last synced: 3 months ago
JSON representation

An Example of Drawing a Map with Svelte + Leaflet

Awesome Lists containing this project

README

          

# Svelte 5 - Leaflet.js Example

![Screenshot](./screenshot.png)

An Example of Drawing a Map with Svelte + Leaflet

## Key Points

- You need to place the `map`'s initialization in the `onMount` hook to ensure that `Leaflet` is rendered on the client side, not the server side.

- Also, you need to import the `leaflet/dist/leaflet.css` file and specify the element's `height` in the `` block in order for the map to display correctly.