0.1.4 • Published 2 years ago

projektpro-leaflet-smoothwheelzoom v0.1.4

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Smooth wheel zoom plugin for leaflet

This solution is based on the repo with some improvements

Usage

fork the repository

npm i gitAccount/Leaflet.SmoothWheelZoom.git#x.x.x

import 'leaflet.smoothwheelzoom';

...

var map = L.map('map', {
  scrollWheelZoom: false, // disable original zoom function
  smoothWheelZoom: true,  // enable smooth zoom 
  smoothSensitivity: 1.5,   // zoom speed. default is 1
});

With Vue2Leaflet

import 'leaflet.smoothwheelzoom';

...

<l-map
    :zoom="zoom"
    :center="center"
    :options="{
        scrollWheelZoom: false,
        smoothWheelZoom: true,
        smoothSensitivity: 1.5,
    }"
  >