Path: blob/main/docs/user_guide/ui_elements/layer_control.md
2046 views
LayerControl
Add a control to the map to show or hide layers.
Common layer arguments
Every layer element in Folium has a couple common arguments:
name: how the layer will be named in the layer control.overlay: True if the layer is an overlay, False if the layer is a base layer.base layer: only one can be active at a time. Tile layers are base layers by default.
overlay: multiple can be active at the same time.
FeatureGroups and most non-tile layers are overlays by default.
control: Whether the layer can be controlled in the layer control.show: Whether the layer will be shown when opening the map.
Next we'll give some examples using a FeatureGroup.