Leaflet.awesome-markers
Leaflet.awesome-markers copied to clipboard
For icons why can we only choose a marker color from a set list and not use a css color code?
Yet it is possible to change the color of the icon in the marker to anything
markerColor -> 'red', 'darkred', 'orange', 'green', 'darkgreen', 'blue', 'purple', 'darkpuple', 'cadetblue'
iconColor -> 'white', 'black' or css code (hex, rgba etc)
Ha! I just stumbled on this myself via folium's documentation and came upstream to understand why.
Indeed, why give hex
flexibility the outline color but not the fill? This would be really helpful as I'm defining other fill colors via a list of hex
colors for a polygon. It would be nice to specify that my marker is color_list[i]
, just like I do with my polygon.
The problem with this script is that it uses big PNG images with the current possible colors. As you can say they use a sprite.
So for now it seems impossible to use your own colors. Something that would be solved with a svg marker.
Wow, so there exists a sprite with all those different colours!
I thought they had changed them to SVG: (https://github.com/lvoogdt/Leaflet.awesome-markers/pull/74)
Hmm, not sure, I did encounter this problem in the python package Folium. I remade the whole map in JavaScript with BeatifyMarker, though, so don't have that problem any more 😼