Closed Ben-Cox closed 2 years ago
The text
parameter is now supported and will be included in the next release. The "iconList2" example will work as expected. Install the devel branch from github (remotes::install_github('tomroh/leaflegend@devel')
)
For reference: leaflet currently only supports font awesome icons from version 4 so if an icon from a later version is not in 4 then no icon will appear. The above workaround converts the font icon to an svg so that it can be rendered regardless of the font awesome icon library that is included as a source for a leaflet map.
1c42f459b255f9683be603361f5ce3ee3844cb44
I can't seem to get leaflegend to display icons used in AwesomeMarkers. There are open issues with certain Font Awesome icons and I've implemented the workaround at https://github.com/rstudio/leaflet/issues/691 for getting the icon to show on the map but I can't figure out how to make them show up in
addLegendAwesomeMarkers()
. I'm primarily an R user and know next to nothing about HTML/CSS. Is there something I can pass toaddControl()
inaddLegendAwesomeMarkers(...)
that can use the text representation of the icon?Thanks!
Reprex: