Skip to content

make it possible to hide a marker_cluster at once #1108

Open
@12rambau

Description

@12rambau

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 ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions