mutsuyuki / Leaflet.SmoothWheelZoom

Smooth wheel zoom plugin for leaflet. This plugin provide smooth zoom ux like Google map.
MIT License
79 stars 31 forks source link

Smooth Wheel Zoom in Leaflet React #12

Open Quellens opened 10 months ago

Quellens commented 10 months ago

at the moment, according to my research, there is no way to integrate this functionality into leaflet react.

I think you would have to work with useMap

like this

const map = useMap() map.options.smoothWheelZoom = true

imneonizer commented 3 weeks ago

Just copy the SmoothWheelZoom.js in your project and import this file directly where you initialize map. it works out of the box.

import "../../../../shared/hooks/Leaflet.SmoothWheelZoom.js";

That's all it works.