multiple markers with one icon by Conengmo · Pull Request #2053 · python-visualization/folium

This is an exploration of an idea.

This is a great idea. I really like this proposal. It is very pragmatic and solves the immediate reported issue. In the review are a few suggestions, mainly to add the generated icon to the map, instead of the Marker. I think it will make the resulting code simpler.

User code would be like this:

m = Map((0, 0))
icon = Icon(icon='music').add_to(m)
Marker((0, 0), icon=icon).add_to(m)
Marker((0, 1), icon=icon).add_to(m)

However, in the review there are also suggestions to make it backwards compatible.

m = Map((0, 0))
icon = Icon(icon='music')
Marker((0, 0), icon=icon).add_to(m)
Marker((0, 1), icon=icon).add_to(m)