Leaflet.awesome-markers
Leaflet.awesome-markers copied to clipboard
FontAwesome 5 SVGs
FontAwesome 5 SVGs don't work out-the-box. I hacked it, though:
https://gist.github.com/pikesley/0197f9ea8aff737e6b80c945f741d584
this didn't work for me, when I do prefix: fa
icon: info-circle
and extraClasses: fas
it makes the class fas fa fa-info-circle
which doesn't work because there is an extra fa
FontAwesome 5 SVGs don't work out-the-box. I hacked it, though:
Thanks! This works. :-)
this didn't work for me, when I do
prefix: fa
icon: info-circle
andextraClasses: fas
it makes the classfas fa fa-info-circle
which doesn't work because there is an extrafa
In addition to that you have to adapt leaflet.awesome-markers.js to get rid of the additional 'fa' from:
return "<i " + iconColorStyle + "class='" + options.extraClasses + " " + options.prefix + " " + iconClass + " " + iconSpinClass + " " + iconColorClass + "'></i>";
to (delete options.prefix
)
return "<i " + iconColorStyle + "class='" + options.extraClasses + " " + iconClass + " " + iconSpinClass + " " + iconColorClass + "'></i>";