Hi I was wondering how I would go about changing react leaflet circle marker colors based on unique IDs.
right now my circle markers look like this:
and I have an ID value being passed with my Lats and Longs.
So for example if there's a list of numbers, (1, 2, 1, 3 ), I would like a marker output where 1 is red and 2 is blue, 3 is some other color..
Don't know if it's helpful, but In R there was a pal feature where I could do something like
pal <- colorFactor(rainbow(4), domain = unique(tmp$ID), levels = unique(tmp$ID))
and then pass it as an option
clusterOptions=markerClusterOptions(), color = pal(tmp$ID))
I'm not sure how to do this in React.
Thank you in advance!