from ipyleaflet import Map, Marker, Circle, CircleMarker, LayerGroup, basemaps
m = Map(center=(52, 10), zoom=8, basemap=basemaps.OpenStreetMap.Mapnik)
m
Map(center=[52, 10], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title', 'zoom_out_tex…
# 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")
# Create a group of layers and add it to the Map
group = LayerGroup(layers=(marker,))
m.add(group)
Map(bottom=21848.0, center=[52, 10], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title…
# Add new layers to the group
group.add(circle)
group.add(circle_marker)
# Remove one layer from the group
group.remove(marker)
# Remove layers from the group
group.clear()