Git Product home page Git Product logo

leaflet.smoothwheelzoom's People

Contributors

alexatiks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

leaflet.smoothwheelzoom's Issues

Zoom in with markers showing a jump from location

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.

Screen.Recording.2022-11-21.at.1.21.49.PM.mov

I have noticed some fixes around that changing smoothWheelZoom: 'center', but that does not create a good user experience.

Doesn't zoom with mousewheel in Firefox

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.