Skip to content

Commit a455912

Browse files
Fix DivIcon text documentation formatting
1 parent d621d9a commit a455912

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

docs/user_guide/ui_elements/icons.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,21 @@ folium.Marker(
5454
5555
m
5656
```
57+
58+
59+
## Adding text using DivIcon
60+
61+
You can display custom text on the map using a DivIcon.
62+
63+
```{code-cell} ipython3
64+
m = folium.Map(location=[0, 0], zoom_start=2)
65+
66+
folium.Marker(
67+
[0, 0],
68+
icon=folium.DivIcon(html='<div style="font-size: 20px">Hello</div>')
69+
).add_to(m)
70+
71+
m
72+
73+
```
74+

0 commit comments

Comments
 (0)