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 tile layer of a CyLeaflet component is updated via callback, the map shows initially blue before manual pan/zoom. After manual pan/zoom, the map renders normally.
This happens whether the tile layer is updated by re-instantiating the entire CyLeaflet component, or by using a callback to update just the children of the underlying Leaflet component.
I've been doing some tests and I've seen that if the browser inspector is open on the side the tiles update works as expected the first 2 times (not including the initial load). If the browser inspector is open on a different window or is not opened at all I can see it failing on the first update. I haven't been able to reproduce the first behaviour by changing the window size.
Screen.Recording.2024-05-08.at.16.59.39.mov
In the Network traffic I see that for each update of updateLeafBounds it first tries to load tiles that are wrong (default position in the map) and then loads the correct tiles according to the latitude and longitude, cancelling the first tiles. The defect we see here is because leaflet is not requesting the correct tiles so either the wrong tiles are loaded (for CARTO tiles) or the request for the tiles fails (for OSM tiles).
This bug is originated in dash_leaflet, I have opened an issue here. The issue is that the URL to requests tiles is built incorrectly after the TileLayer is updated. This URL has the format 'https://{s}.somedomain.com/blabla/{z}/{x}/{y}{r}.png' where z is the zoom level, which is an integer value from 1 to the maximum allowed by the tiles provider. In the incorrect requests the URL uses the zoom value, which can have decimal numbers, instead of the zoom level, which is always an integer.
Description
When the tile layer of a CyLeaflet component is updated via callback, the map shows initially blue before manual pan/zoom. After manual pan/zoom, the map renders normally.
This happens whether the tile layer is updated by re-instantiating the entire CyLeaflet component, or by using a callback to update just the
children
of the underlying Leaflet component.Initially (after callback):
After zooming out then in:
Steps/Code to Reproduce
Versions
dash_cytoscape==1.0.0
The text was updated successfully, but these errors were encountered: