[英]I want to add a legend in folium map to the code below
m = folium.Map(location=[39.735,-84.15],zoom_start=10.5)
for idx, row in gdf1.iterrows():
folium.Marker([row['Latitude'], row['Longitude']], popup=row['Name'],
icon=folium.Icon(color=row['Colors'])).add_to(m)
This code shows the following output此代码显示以下 output
I want to make a legend that will say the blue marker represent 'other hospitals' and the red marker represent 'dayton'我想制作一个图例,蓝色标记代表“其他医院”,红色标记代表“代顿”
Please have a look here in this related post Create a Legend on a Folium map请在此处查看相关帖子在 Folium 上创建图例 map
There are two possibilities mentioned:提到了两种可能:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.