Skip to content

Repository files navigation

@onsvisual/svelte-maps

npm version

Reusable map components for Svelte projects built on Maplibre GL JS.

Usage examples can be found in the /src/App.svelte file in this repo, which can be previewed live here.

Interaction options

You can mirror the Maps template scrollZoomGuard behaviour by enabling guarded scroll zoom:

<Map
  id="map"
  style="./style.json"
  scrollZoomGuard={true}
/>

When enabled, map zoom via wheel/trackpad requires a modifier key (cmd/ctrl) plus scroll.

scrollZoomGuard maps to MapLibre cooperativeGestures and takes precedence over options.cooperativeGestures when both are provided.

About

Reusable map components for Svelte projects.

Resources

Stars

30 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages