Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smooth Wheel Zoom in Leaflet React #12

Open
Quellens opened this issue Dec 30, 2023 · 1 comment
Open

Smooth Wheel Zoom in Leaflet React #12

Quellens opened this issue Dec 30, 2023 · 1 comment

Comments

@Quellens
Copy link

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants