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):
![image005](https://private-user-images.githubusercontent.com/4672118/303046386-f95611b3-16df-463e-913e-86e6be8aef06.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMDIwNzcsIm5iZiI6MTcyNjEwMTc3NywicGF0aCI6Ii80NjcyMTE4LzMwMzA0NjM4Ni1mOTU2MTFiMy0xNmRmLTQ2M2UtOTEzZS04NmU2YmU4YWVmMDYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MTJUMDA0MjU3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MGQ0Yjc3NjQzNzYzNjRiYzIyODY0NzQ0ZDE1YjAyY2JiM2RhZDFkNDg2ZjQzYTNmYTI4Njc4MTRlZWU1OTU0NSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.k3B47uyOyc0CGhpZLm1MUBDBmdR5yOlkrQNBTKcZrDI)
After zooming out then in:
![image006](https://private-user-images.githubusercontent.com/4672118/303046736-79024aea-dc9c-4cc0-8289-f43f78ee2152.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMDIwNzcsIm5iZiI6MTcyNjEwMTc3NywicGF0aCI6Ii80NjcyMTE4LzMwMzA0NjczNi03OTAyNGFlYS1kYzljLTRjYzAtODI4OS1mNDNmNzhlZTIxNTIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MTJUMDA0MjU3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YzhmZmQwMTc1MmM2MzMzMjViNWUxNDZmZWQ4NWQwMGE5MDEwYTBmNjFmZmUwMWY2NDg1M2Y3ZDQ2MWRhMmIyYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.AZUBskfPeIldyuIz66JB3ncZci5XWnKQSxN0Zy03yTY)
Steps/Code to Reproduce
Versions
dash_cytoscape==1.0.0
The text was updated successfully, but these errors were encountered: