Created
May 4, 2017 14:13
-
-
Save Nyahua/7d4cdbf9b721a87d68d71a0d9ee8454e to your computer and use it in GitHub Desktop.
add html ref to popup marker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import folium | |
ref_html = r'<a href="http://www.shenyang.gov.cn/" target="_blank"> I am here </a>' | |
pop_html = folium.Popup(folium.Html(ref_html, script=True)) | |
map_1 = folium.Map(location=[41.8057, 123.4315], zoom_start=12, | |
tiles='Stamen Terrain') | |
folium.Marker( | |
location = [41.8057, 123.4315], | |
popup = pop_html).add_to(map_1) | |
# map_1.save('marker_html.html') | |
map_1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment