0
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

enter image description here

I want to make a legend that will say the blue marker represent 'other hospitals' and the red marker represent 'dayton'

James Z
  • 12,209
  • 10
  • 24
  • 44

1 Answers1

0

Please have a look here in this related post Create a Legend on a Folium map

There are two possibilities mentioned:

  • using layercontrol with colors (would mean you use multiple MarkerCluster)
  • just adding an image as an overlay with your text and color
flipSTAR
  • 579
  • 1
  • 4
  • 18