Open ilyankou opened 7 years ago
Thanks for all of the March 15th improvements.
As for leaflet.awesome-markers, I noticed that a different developer has taken over code maintenance on a different site. See this thread https://github.com/lvoogdt/Leaflet.awesome-markers/issues/79
Here is leaflet.awesome-markers v2.0 https://github.com/sigma-geosistemas/Leaflet.awesome-markers
Would it be possible for you to switch us over this newer version? And if so, does that increase our color spectrum?
Jack,
They use the same .png files for the icons, but oddly enough have more markerColor
options available: 'white', 'red','darkred', 'lightred', 'orange', 'beige', 'green', 'darkgreen', 'lightgreen', 'blue', 'darkblue', 'lightblue', 'purple', 'darkpurple', 'pink', 'cadetblue', 'white', 'gray', 'lightgray', 'black'.
Switching to this will double the number of colors in the palette, but we still won't be able to use hex or any other color code. In the ideal world the markers would be svg so that we can apply any colors to them, as opposed to raster images (although it might be possible to create some layers on top of a white marker and play with css to change their transparency, colors, etc – who knows).
A question: do we really need a wide variety of colors?
Thanks for investigating. When I looked at our current CSS code, I see that leaflet-awesome-markers v1 supports the 19 colors that appear in v2, even though the v1 documentation lists fewer colors. https://github.com/JackDougherty/leaflet-maps-with-google-sheets-dev/blob/master/scripts/Leaflet.awesome-markers/leaflet.awesome-markers.css
So my goal is simply to make sure we're using the best available version of leaflet-awesome markers. If you have time today or Friday, please upload v2 into our dev code to see if it runs as expected. If yes, please add it there and update the README credits.
Just to chime in, I think it would be great to be able to map hex color codes to leaflet markers, in the same way that palettes are commonly mapped to points or polygons.
Also to chime in: indeed, many thanks! I also want to add my support for specific hex values to produce my map. I've made a map of LGBTQ historical sites to launch with my book but they don't carry the vibrancy of the people's stories withins. Given that maps lie so well, especially when it comes to color, mapping in specific hex values would Leaflet maps shine.
And hallo @JackDougherty :)
Good to hear from you, Jack G (@jgieseking ) @ilyankou - would you please take another look at this issue and tell us what you recommend?
Aaaaaalrighty y'all!
I looked into the issue. This gentleman (@wesleyvandevoorde) proposed marker changes from .png to .svg back in 2016, and submitted a pull request (https://github.com/lvoogdt/Leaflet.awesome-markers/pull/74) - which was never accepted. But I tested it and it works perfectly! So I updated the main repository https://github.com/DataVizForAll/leaflet-maps-with-google-sheets to include these changes.
Once you sync your repositories with the updated main one:
darkblue
), hex (#aa8653
), rgba with transparencies (rgba(200,0,100,0.5)
) - you name it!Created a plugin for Leaflet with these changes: https://github.com/ilyankou/Leaflet.IconMaterial
Awesome! Thank you!!
It is not possible to use hex for
Marker Color
value. We useLeaflet.awesome-markers
plugin (https://github.com/lvoogdt/Leaflet.awesome-markers), in which the only colors allowed are: 'red', 'darkred', 'orange', 'green', 'darkgreen', 'blue', 'purple', 'darkpuple', 'cadetblue'.When the color is not from the list above, it defaults to a red.
If you look into plugin's code, you will see a
sprite
(multiple images combined into one .png file) with the icons of above-mentioned colors: https://github.com/lvoogdt/Leaflet.awesome-markers/blob/2.0/develop/dist/images/markers-plain.png