alexatiks / leaflet.smoothwheelzoom Goto Github PK
View Code? Open in Web Editor NEWSmooth wheel zoom plugin for leaflet
Smooth wheel zoom plugin for leaflet
How to change zoom control widget position from top-left to any other?
Hi, First of All thank you very much for this plugin, as it has helped me in my application to increase the user experience much better.
However, i got an issue, maybe someone can help me with it, that when i zoom in with my markers on the map, it shows a lag between zoom in and changing of marker's location on the map. Can someone help me as to how can i fix that problem?
Below video can explain the problem that i am having.
I have noticed some fixes around that changing smoothWheelZoom: 'center'
, but that does not create a good user experience.
Zooming in/out with mousewheel doesnt seem to work in Firefox. No problem in Chrome, Edge. Your Demo works fine and my project without this plugin works fine.
I placed your SmoothWheelZoom.js file in my src
directory and imported in my file.
import "../Leaflet.SmoothWheelZoom.js";
this.map = L.map("map", {
preferCanvas: true,
tap: false,
zoomControl: false,
scrollWheelZoom: false, // disable original zoom function
// @ts-expect-error: Till a way is found to extend Map definition
smoothWheelZoom: true, // enable smooth zoom
smoothSensitivity: 0.25, // zoom speed. default is 1
editable: true
});
L.control.zoom({ position: "topright" }).addTo(this.map);
this.tileLayer = L.tileLayer(this.url, {
attribution: this.attribution,
maxZoom: 30
});
// this.map.scrollWheelZoom = true; // This doesn't work too
@alexatiks Any suggestions?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.