Skip to content

Commit 53bf936

Browse files
jpeacock29ocefpaf
authored andcommitted
Note issue-726 solution in Marker documentation and add example (#771)
1 parent f8a12a6 commit 53bf936

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

folium/map.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ class Marker(MacroElement):
200200
location: tuple or list, default None
201201
Latitude and Longitude of Marker (Northing, Easting)
202202
popup: string or folium.Popup, default None
203-
Input text or visualization for object.
203+
Label for the Marker; either an escaped HTML string to initialize
204+
folium.Popup or a folium.Popup instance.
204205
icon: Icon plugin
205206
the Icon plugin to use to render the marker.
206207
@@ -212,7 +213,9 @@ class Marker(MacroElement):
212213
--------
213214
>>> Marker(location=[45.5, -122.3], popup='Portland, OR')
214215
>>> Marker(location=[45.5, -122.3], popup=folium.Popup('Portland, OR'))
215-
216+
# If the popup label has characters that need to be escaped in HTML
217+
>>> Marker(location=[45.5, -122.3],
218+
popoup=folium.Popup('Mom & Pop Arrow Shop >>', parse_html=True))
216219
"""
217220
def __init__(self, location, popup=None, tooltip=None, icon=None):
218221
super(Marker, self).__init__()

0 commit comments

Comments
 (0)