Maybe you could use an AttributeCreator to create the attribute 'color' and set the value with Conditional Value and then use Operator Contains Regex to search for KFF to set the color to red.
Your Regular Expression is not to difficult, as you are searching for a very specific string.
Below the answer shown in one single screenshot 🙂
HTH,
Egge-Jan
P.S. of course, the Operator Contains should work as well...
Maybe you could use an AttributeCreator to create the attribute 'color' and set the value with Conditional Value and then use Operator Contains Regex to search for KFF to set the color to red.
Your Regular Expression is not to difficult, as you are searching for a very specific string.
Below the answer shown in one single screenshot
HTH,
Egge-Jan
P.S. of course, the Operator Contains should work as well...
Thanks for the reply!
From what I see in the HTML that is generated the color that is chosen in the "Layer color" is written out like this:
],
{
onEachFeature: function (feature, layer) {
layer.bindPopup(feature.properties.popupContent);
},
style:{"color": "rgb(170,0,0)"},
pane: "labels"
}).addTo(map);
map.fitBounds(layer.getBounds());
</script>
The points in the map are however always displayed in blue. So how do I change the color of the points in the HTML?
Ah, you are using Leaflet - a JavaScript library for interactive maps (leafletjs.com). And in your map you are using the default leaflet markers.
I think you should go and try to use CircleMarkers.
Something like:
function styleL1(feature) {
return {
fillColor: '#000080',
color: "#C0C0C0",
weight: 1,
opacity: 1,
fillOpacity: 1
};
}
and
var nlStations = L.Proj.geoJson(nl_stations, {
attribution: proRailSpoordataAttr,
pointToLayer: function (feature, latlng) {
return L.circleMarker(latlng, styleL1(feature));
},
onEachFeature: onEachFeatureL1
}).addTo(map);
With conditional styling of course...
HTH,
Egge-Jan