Add class_name argument to more map elements #2055
Labels
enhancement
Feature request or idea about how to make folium better
help wanted
Help is welcome for this issue or PR
LeafletJS reference mentions a
className
option for several classes, such asPath
(https://leafletjs.com/reference.html#path). The option is used to give elements custom CSS classes. It is implemented in Folium as theclass_name
keyword argument, but it is currently only available forDivIcon
andGeoJsonPopup
.I would like to be able to give custom classes to
PolyLine
elements (and otherBaseMultiLocation
elements) via theclass_name
keyword argument.Currently, I'm abusing the
fill_color
argument (and settingfill_opacity=0
) as a place to store the classes to be later accessed and properly added by a JS script, but this solution is far from perfect, to put it mildly.The text was updated successfully, but these errors were encountered: