←Examples

Disable scroll wheel zoom @0.0.4^

Disables mouse wheel intereactions for zoom and allows only zoom via controls.

<script>
  import Map from "@anoram/leaflet-svelte";
   let options = {
    recenter: true,
    zoom: 5,
    markers: [
      {
        lat: 8,
        lng: 8,
      },
      {
        lat: 13,
        lng: 80,
      },
    ],
    controls: {
      zoomControl: true,
    },
    scrollWheelZoom: false,
    mapID: "map",
    attributionControl: true,
  };
  
</script>

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

</style>


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

Note

scrollWheelZoom by default is true additionally you can remove the zoom control element by setting controls: {zoomControl: true } to false.