@napxdd/mapbox-svelte
v1.1.6
Published
A Svelte component library for Mapbox GL JS
Maintainers
Readme
mapbox-svelte
A Svelte component library for Mapbox GL JS, providing easy-to-use components for building interactive maps.
Installation
npm i @napxdd/mapbox-svelteUsage
Add your mapbox key to env
PUBLIC_MAPBOX_KEY=your_key<script>
import * as Mapbox from 'mapbox-svelte';
let mapComponent: Mapbox.Container;
</script>
<div class="map-container">
<Mapbox.Container></Mapbox.Container>
</div>
<style>
.map-container {
width: 100%;
height: 500px;
}
</style>For more information visit Mapbox-svelte documentation
Requirements
- Svelte 5.0+
- Mapbox GL JS 3.13.0+
License
MIT
