forked from Leaflet/Leaflet
-
Notifications
You must be signed in to change notification settings - Fork 0
Fractional zoom level in tile URLs. (Edit) #448
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingdevin-assessedIssue has been assessed by Devin automated remediation pipelineIssue has been assessed by Devin automated remediation pipelinedevin-cannot-reproduceDevin automated pipeline could not reproduce this bugDevin automated pipeline could not reproduce this bugmanual-onlyneeds triageTriage pendingTriage pending
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdevin-assessedIssue has been assessed by Devin automated remediation pipelineIssue has been assessed by Devin automated remediation pipelinedevin-cannot-reproduceDevin automated pipeline could not reproduce this bugDevin automated pipeline could not reproduce this bugmanual-onlyneeds triageTriage pendingTriage pending
Type
Fields
Give feedbackNo fields configured for issues without a type.
Checklist
Steps to reproduce
When having non-integer
zoomSnapoption and callingmap.redraw()method, it may result in fractional zoom level in tile URL, like2.4396229271192125/0/2. It can happen after view is set bysetView(),fitBounds()or similar methods. Zooming in and out by mouse wheel normalizes the situation and map is loaded.Seems this place in code is missing
Math.round()call:https://github.com/Leaflet/Leaflet/blob/2f5594810c26aa87019582d381960f1b10c1bf62/src/layer/tile/GridLayer.js#L235
Expected behavior
Tiles are always requested with integer coordinates.
Current behavior
Tiles may be requested with fractional Z coordinate.
Minimal example reproducing the issue
No response
Environment