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

make it possible to hide a marker_cluster at once #1108

Open
12rambau opened this issue Mar 24, 2023 · 1 comment · May be fixed by #1109
Open

make it possible to hide a marker_cluster at once #1108

12rambau opened this issue Mar 24, 2023 · 1 comment · May be fixed by #1109

Comments

@12rambau
Copy link

When using the marker_cluster example, I cannot hide all the underlying markers at once as with other layers by setting a visible trait to False:

from ipyleaflet import Map, Marker, MarkerCluster

m = Map(center=(50, 0), zoom=5)

marker1 = Marker(location=(48, -2))
marker2 = Marker(location=(50, 0))
marker3 = Marker(location=(52, 2))

marker_cluster = MarkerCluster(
    markers=(marker1, marker2, marker3)
)

m.add_layer(marker_cluster);
marker_cluster..visible = False

m

In order to do it I can only hide each underlying marker individually.

Would it it be a desirable feature ?

@martinRenou
Copy link
Member

Thanks, having support for visible on all layers would be nice indeed

@12rambau 12rambau linked a pull request Mar 24, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants