-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Fancy HTML does not display from inside a for loop #799
Copy link
Copy link
Closed
Description
The following code will only display the first marker of "geo_list" and the html popup will also not be displayed. If I remove the for loop and then the popup is displayed.
Code:
import folium
import pandas as pd
print(folium.file)
print(folium.version)
m = folium.Map(zoom_start=6,tiles='Stamen Toner')
html="""
This is a big popup
"""
geo_list = [(40.712783700000003, -74.005941299999989),
(34.052234200000001, -118.24368490000002),
(41.878113599999999, -87.62979820000001)]
popup = folium.Popup(html=html,max_width=2650)
for lat,lon in geo_list:
print(lat,lon)
folium.Marker([lat,lon], popup=popup).add_to(m)
m
Output:
C:\Program Files\Anaconda3\lib\site-packages\folium_init_.py
0.5.0
40.7127837 -74.00594129999999
34.0522342 -118.24368490000002
41.8781136 -87.62979820000001
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels