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.
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.