In [ ]:
from ipyleaflet import Map, Marker, Circle, CircleMarker, LayerGroup, basemaps

In [ ]:
m = Map(center=(52, 10), zoom=8, basemap=basemaps.Hydda.Full)
m

In [ ]:
# Create a few layers
marker = Marker(location=(52, 10))
circle = Circle(location=(52, 12), radius=50000)
circle_marker = CircleMarker(location=(52, 9), radius=10, color="red", fill_color="red")

In [ ]:
# Create a group of layers and add it to the Map
group = LayerGroup(layers=(marker,))
m.add_layer(group)

In [ ]:
# Add new layers to the group
group.add_layer(circle)
group.add_layer(circle_marker)

In [ ]:
# Remove one layer from the group
group.remove_layer(marker)

In [ ]:
# Remove layers from the group
group.clear_layers()