Quick Start
Svelte wrapper for leaflet. To use in svelte. For bugs and suggestions please file issue here
npm i @anoram/leaflet-svelte
Have <Map options={options}/>
a child of a div and supply custom css for height/width.
Minimal Example
<script>
import Map from '@anoram/leaflet-svelte'
let options={
center: [13,80],
markers: [
{
lat: 13,
lng: 80
}
],
mapID: "map"
}
</script>
<style>
.map {
height: 600px;
width: auto;
}
</style>
<div class="map">
<Map {options} />
</div>
mapID
is unique like if you are planning to use multiple maps on the same page consider having different mapID