Closed miccoh1994 closed 8 months ago
current workaround is to add property for each key in the feature being used e.g. feature:
{
"id": 115979,
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
20.6419111,
-28.79971792
]
},
"properties": {
"P_value": 0.11,
"P_max": 0.16,
"P_min": 0.12,
"P_max_key": "P_max", // added
"P_min_key": "P_min", // added
"S_value": 0.23,
"S_max": 0.3,
"S_min": 0.2,
"S_max_key": "S_max", // added
"S_min_key": "S_min", // added
}
}
rule
{
"name": "below min",
"filter": [
"<",
{
"name": "property",
"args": [
"P_value"
]
},
{
"name": "property",
"args": [
"P_min_key"
]
}
],
"symbolizers": [
{
"kind": "Text",
"label": "{{P_value}}",
"size": 12,
"fontWeight": "bold",
"font": [
"Arial"
],
"offset": [
0,
-15
],
"color": "#FF0200",
"haloColor": "#333333",
"haloWidth": 10,
"haloOpacity": 1,
"opacity": 1,
"maxAngle": 0,
"allowOverlap": true,
"avoidEdges": false,
"anchor": "center"
}
]
}
P_max_key and use a property function to return the key to use :zany_face:
Nice catch @miccoh1994. Are you planning on providing a PR for this?
Nice catch @miccoh1994. Are you planning on providing a PR for this?
I will submit a PR with tests sometime this week
Surely this:
https://github.com/geostyler/geostyler-openlayers-parser/blob/59944a7c0acc3dee40eb8924b7c0ae464a9c0d74/src/OlStyleParser.ts#L901
should be:
or at least (if original line is intended):
example rule: