-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
Vector tile layer control doesn't work #747
Comments
This is probably an ipyleaflet issue because the VectorTileLater class doesn't have an attribute for toggling the layer off programmatically, e.g., layer.visible=False https://ipyleaflet.readthedocs.io/en/latest/layers/vector_tile.html |
Was just about to comment.. yes I found out that it's not as simple as with other layers which have the for l in layers:
if l.name=="Fields":
l.vector_tile_layer_styles = {'fields':{'fillOpacity':0, 'opacity':0}} which worked to make it invisible. However this involves keeping track of the original styles and names used for these layers. I'll work on this anyway independently, but if I manage to make it work in leafmap, I'll make a PR. |
Sounds good. Thanks. |
Hello :) I'm working on a project for a university course I'm taking and I hit a similar issue. Same problem is reproducible with I just started familiarising myself with the library so I might be just using it wrong. This is how I try to use it: map = leafmap.Map()
map.add_circle_markers_from_xy(dataset1, ..., layer_name = "dataset1")
map.add_circle_markers_from_xy(dataset2, ..., layer_name = "dataset2") Thank you for your efforts! This library has huge potential, I'm excited to dig deeper. |
This issue has been solved in ipyleaflet by adding @zvezdi the issue with circle markers is also an issue upstream, but I think this will be need to be solved further upstream (in leaflet.js) because circleMarkers do not have the |
@lopezvoliver Thank you very much for fixing this issue upstream. This is great! |
Environment Information
Description
Adding a vector tile layer, I expect the control to turn on/off the layer to work, but the layer remains in the map.
What I Did
Example using ipyleaflet without leafmap (expected behavior)
Example using leafmap (bug)
The text was updated successfully, but these errors were encountered: