You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the zoom value is not an integer and the dl.TileLayer is updated via callback the initial tiles requests are wrong and therefore failing. The URL for these requests is using the zoom value instead of it corresponding zoom level, which should be the closest integer.
Select OSM in the dropdown to load default dl.TileLayer
See that the tiles fail to load
Use scroll to zoom out
See that the tiles are loaded correctly
Select CARTO in the dropdown to load Carto tile layer.
See that the tiles loaded don't correspond to the center coordinates
Use scroll to zoom in/out
See that the tiles are loaded correctly
Scenario 2: using zoomControl tooltip to have integer zoom values
Zoom in using the zoomControl tooltip. (Now zoom value will be equal to 18 and any zoom in/out using this control will be an integer value)
Select OSM in the dropdown to load default dl.TileLayer
See that the tiles are loaded correctly
Select CARTO in the dropdown to load Carto tile layer.
See that the tiles are loaded correctly
Demo
Screen.Recording.2024-06-04.at.20.34.21.mov
Expected result
The zoom value shouldn't be used to build the tiles requests in any case as these requests are incorrect. It's closest zoom level should be used instead.
The text was updated successfully, but these errors were encountered:
Description
When the
zoom
value is not an integer and thedl.TileLayer
is updated via callback the initial tiles requests are wrong and therefore failing. The URL for these requests is using thezoom
value instead of it corresponding zoom level, which should be the closest integer.For example, if the
zoom
is set to17.5
and thechildren
prop is updated via callback to a differentdl.TileLayer
the first requests would be https://b.tile.openstreetmap.org/17.5/52778/63857.png (which is shows an invalid tile error) when it should instead be https://b.tile.openstreetmap.org/18/52778/63857.pngAfter these failed requests if the
zoom
value changes it then generates the correct URLs for the tiles requests.Reproduce the bug running the code below:
Scenario 1: before changing
zoom
valuedl.TileLayer
center
coordinatesScenario 2: using
zoomControl
tooltip to have integerzoom
valueszoomControl
tooltip. (Nowzoom
value will be equal to 18 and any zoom in/out using this control will be an integer value)dl.TileLayer
Demo
Screen.Recording.2024-06-04.at.20.34.21.mov
Expected result
The
zoom
value shouldn't be used to build the tiles requests in any case as these requests are incorrect. It's closest zoom level should be used instead.The text was updated successfully, but these errors were encountered: