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

get_visibility function? #114

Open
wendellwt opened this issue Dec 3, 2024 · 2 comments
Open

get_visibility function? #114

wendellwt opened this issue Dec 3, 2024 · 2 comments
Assignees

Comments

@wendellwt
Copy link

How do you retrieve the visibility of a layer?

Issue #111 describes how to 'update' a layer by removing it and replacing it with the updated source. It would be nice to preserve the visibility that the original layer had, but I am not able to retrieve the visibility.

vis = m.get_visibility(layerid)   # no such function
# remove and replace layer here
m.set_visibility(layerid, visible=vis)

Q: is there a 'get_visibility' corresponding to the 'set_visibility' function?

@crazycapivara
Copy link
Contributor

@wendellwt Hi, at the moment, but I think I can add generic function to suppert all Map.get_* methods, but it will be a little bit tricky, because we have to define a variable to pass the values from JS back to Python as done for some other values as well, but in this case it should be dynamic. Do you use maplibre for Shiny or the ipywidget?

@wendellwt
Copy link
Author

Thank you.
I use maplibre for Shiny.

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

No branches or pull requests

2 participants