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

import Map from '@anoram/leaflet-svelte'
let options={
  center: [13,80],
  markers: [
      lat: 13,
      lng: 80
  mapID: "map"
  .map {
    height: 600px;
    width: auto;
<div class="map">
  <Map {options} />

mapID is unique like if you are planning to use multiple maps on the same page consider having different mapID