JanChodorowski / Leaflet.SmoothWheelZoom

Smooth wheel zoom plugin for leaflet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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,
    }"
  >

About

Smooth wheel zoom plugin for leaflet


Languages

Language:JavaScript 100.0%