如何在单击一个标记时在两个标记之间添加一条线。例如,在下面的代码中,我为班加罗尔和德里创建了两个标记。假设当我点击班加罗尔,应该画一条从班加罗尔到德里的线。如何在叶中完成这项工作?在
import folium as fl
bangalore = [12.9716, 77.5946]
delhi = [28.7041, 77.1025]
m = fl.Map(location = delhi, zoom_start = 4)
fl.CircleMarker(location = bangalore, tooltip = 'Bangalore',radius = 2, fill = True).add_to(m)
fl.CircleMarker(location = delhi, tooltip = 'New Delhi',radius = 2, fill = True).add_to(m)
m.save('map.html')
目前没有回答
相关问题 更多 >
编程相关推荐