←Examples

Drawing circle overlays on a map @0.0.6^

Circle markers are declared as arrays just like markers it can have tooltips and popups

<script>
  import Map from "@anoram/leaflet-svelte";
let options = {
    zoom: 15,
    center: [13, 80],

    circles: [
      {
        lat: 13,
        lng: 80.005,
        color: "green",
        fillColor: "#0f0",
        fillOpacity: 0.5,
        radius: 250,
        tooltip: {
          text: `sticky across the entire raduis`,
          direction: "top",
          sticky:true
        },
      },
      {
        lat: 13,
        lng: 80,
        color: "red",
        fillColor: "#f03",
        fillOpacity: 0.5,
        radius: 250,
        tooltip: {
          text: `Yaay I can also have tooltips`,
          direction: "top",
        },
      },
    ],
    mapID: "map",
};
  
</script>

<style>
  .map {
    height: 600px;
    width: auto;
  }

</style>


<div class="map">
  <Map {options} />
</div>

Note

Radius are in meters more info here