diff --git a/docs/user_guide/ui_elements/icons.md b/docs/user_guide/ui_elements/icons.md index f5024772c1..9ab66b7ed5 100644 --- a/docs/user_guide/ui_elements/icons.md +++ b/docs/user_guide/ui_elements/icons.md @@ -54,3 +54,33 @@ folium.Marker( m ``` + +## Text labels with DivIcon + +`DivIcon` allows you to add text directly on the map using an HTML `div` element. +This is useful when you want a visible label at a specific location, without +relying on tooltips or popups that only appear on interaction. + +```{code-cell} ipython3 +m = folium.Map(location=[41, -71], zoom_start=6) + +folium.Marker( + location=[41, -71], + icon=folium.DivIcon( + html='