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

[BUG] CyLeaflet: Updating Leaflet tile layers does not change max zoom of CyLeaflet #205

Closed
emilykl opened this issue Feb 7, 2024 · 1 comment · Fixed by #216
Closed
Assignees

Comments

@emilykl
Copy link
Contributor

emilykl commented Feb 7, 2024

Description

After creating a CyLeaflet instance, the tile layer can be updated by using a callback to update the children of the Leaflet component.

If the new tile layer has a different max zoom level than the previous tile layer, you would expect the maximum zoom of CyLeaflet to also change, but instead it remains the same.

Expected Results

The maximum zoom of CyLeaflet updates to match the maximum zoom of the new tile layer.

Actual Results

The maximum zoom of CyLeaflet remains the same.

If the new tile layer has a higher maxZoom than the old one, this means you are not able to zoom in as far as the new tile layer allows.

If the new tile layer has a lower maxZoom than the old one, this means CyLeaflet will not properly stop the zooming at the new maxZoom, resulting in the tiles disappearing when zooming beyond that point.

@emilykl
Copy link
Contributor Author

emilykl commented Mar 1, 2024

Proposed fix: Add a callback as part of the CyLeaflet AIO component, which takes the Leaflet children as input and Cytoscape max zoom as output. The callback looks at the maxZoom of the first child in the Leaflet children and applies the appropriate corresponding Cytoscape max zoom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants