I am playing with Folium a lot right now and its really great to have something so easy to use in Python. But their documentation is seriously behind, which I understand. So I have 2 questions.
map.simple_marker(each_coord, popup=v[0], marker_color='#FFFF00')
map.simple_marker(each_coord, popup=v[0], marker_color='yellow')
map.simple_marker(each_coord, popup=v[0], marker_color='Yellow')
They should all make the marker yellow, instead it stays default red. The only colors I can actually change to are red, green, and purple. In an example from the folium documentation it looks like we should be able to use html color codes:
folium.CircleMarker([45.5215, -122.6261],
radius=500,
popup='Laurelhurst Park',
color='#3186cc',
fill_color='#3186cc',
).add_to(map_2)
But it doesn't work for me. Hope someone knows a way around this because I need at least 12 different colors for my project.
FutureWarning: simple_marker is deprecated. Use add_children(Marker) instead
which I think might be related to why I can't get the colors to work. But their is nothing in any of the documentation or open discussions about how to use add_children
Maybe someone with knowledge can clarify?Thanks
I had the same problem. Here are the colors that work for markers:
colors = [
'red',
'blue',
'gray',
'darkred',
'lightred',
'orange',
'beige',
'green',
'darkgreen',
'lightgreen',
'darkblue',
'lightblue',
'purple',
'darkpurple',
'pink',
'cadetblue',
'lightgray',
'black'
]
folium.Marker([lat, lon], popup=str(name)+': '+color+'-'+str(clname), icon=folium.Icon(color=color)).add_to(feature_group)