I have a map with some features, but I want to shoe them depending on al field.
May be
if [fieldname] = 0 --> color = RED else --> color = blue
Could anyone give a clue where to start?
Searching at leaflet documentation I managed to program
function getColor(d) {
return d = 0 ? '#3182bd' :
d = 1 ? '#31a354' :
'#FFEDA0';
}
function style(feature) {
return {
fillColor: getColor(feature.properties.*fieldname*),
};
}
But I'm not sure how to integer it, if I'm on the way or there's something easier with gvnix
Thanks all Javier