我试图在地图上用经度和纬度来绘制机场的地图,但是输出没有显示任何东西

2024-10-04 09:25:18 发布

您现在位置:Python中文网/ 问答频道 /正文

我想用folium在地图上定位机场。我有一份机场坐标表。但当我把文件保存为'地图.html,没有输出。你知道吗

数据帧“文件”包含机场信息:

enter image description here

file.columns=['name','longitude','latitude']
latlong= [(i,j) for i in file['longitude'] for j in file['latitude']]
mapit = folium.Map( location=[1.3521, 103.8198], zoom_start=6 )
for coord in latlong:
    mapit = folium.Map(location = [coord[0],coord[1]])
mapit.save('map.html')

Tags: 文件inmapforhtml地图locationfile