Python-Folium地图不显示标记

问题描述 投票:1回答:1

我在python中有此代码并显示地图。

import folium
from IPython.display import HTML, display

city_location = [-23.6573395, -46.5322504]

mapa = folium.Map(location=city_location,  zoom_start=15)
mapa

但是,要添加标记,请勿显示。

tooltip = 'Click me!'
folium.Marker([-23.6573395, -46.5322504], popup='<i>Teste</i>', tooltip=tooltip).add_to(mapa)
mapa

请帮助我!

python python-3.x dictionary marker folium
1个回答
2
投票
import folium city_location = [-23.6573395, -46.5322504] m = folium.Map(location=city_location, zoom_start=15, tiles='openstreetmap') folium.Marker(city_location, popup='<i>Teste</i>', tooltip='Click me!').add_to(m) m

输出:enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.