Creating marker on map using Folium results in blank HTML page

后端 未结 2 1382
南方客
南方客 2021-01-27 18:29

I tried to create a Map using folium library in python3. It work\'s fine until i add a Marker to the map. On adding Marker the output results in just a blank HTML page.

2条回答
  •  自闭症患者
    2021-01-27 19:02

    @MCO is absolutely correct.

    I like to leverage html.escape() to handle the problem characters like so

    import folium
    import html
    
    map = folium.Map(location=[20.59,78.96], tiles = "Mapbox Bright")
    
    folium.Marker([26.80,80.76],popup=html.escape("Hey, It's Moradabad")).add_to(map)
    map.save("mapOutput.html")
    

提交回复
热议问题