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

Fix mouse events on overzoomed canvas tiles #252

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Dec 12, 2020

  1. Fix mouse events on overzoomed canvas tiles

    When using maxZoom and maxNativeZoom to "overzoom" tiles to higher zoom
    levels, the existing Canvas.Tile logic incorrectly calculates where the
    mouse is within the tile, because it does not scale the real pixels to
    the canvas' pixels, which are now 2, 4, 8, etc times larger. This means
    that features cannot be hovered or clicked on.
    
    This commit adds logic to scale offsets and mouse locations according to
    the overzoom factor, which restores the behavior of non-overzoomed tiles.
    zmbc committed Dec 12, 2020
    Configuration menu
    Copy the full SHA
    fd557a1 View commit details
    Browse the repository at this point in the history