Skip to content

Commit 23618fb

Browse files
committed
docs: fix #2903: User guide LayerControl example doesn't work
Amends the example so the `TileLayer` is an overlay instead of base layer, so that it can be hidden as well as shown
1 parent b2cb81a commit 23618fb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docs/user_guide/ui_elements/layer_control.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ Add a control to the map to show or hide layers.
1212
```{code-cell} ipython3
1313
m = folium.Map(tiles=None)
1414
15-
folium.TileLayer("OpenStreetMap").add_to(m)
16-
folium.TileLayer(show=False).add_to(m)
15+
folium.TileLayer("OpenStreetMap", overlay=True).add_to(m)
1716
1817
folium.LayerControl().add_to(m)
1918

0 commit comments

Comments
 (0)