-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #794 from miccoh1994/master
fix: parsing of property functions in filter args
- Loading branch information
Showing
3 changed files
with
117 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import {Fproperty, Style} from "geostyler-style"; | ||
|
||
const value: Fproperty = { | ||
name: "property", | ||
args: [ | ||
"value" | ||
] | ||
}; | ||
|
||
const min: Fproperty = { | ||
name: "property", | ||
args: [ | ||
"min" | ||
] | ||
} | ||
|
||
const max: Fproperty = { | ||
name: "property", | ||
args: [ | ||
"max" | ||
] | ||
} | ||
|
||
const filterComparisonPropertyFunction: Style = { | ||
name: 'OL Style', | ||
rules: [ | ||
{ | ||
name: "between min and max", | ||
filter: [ | ||
"&&", | ||
[ | ||
">=", | ||
value, min | ||
|
||
], | ||
[ | ||
"<=", | ||
value, | ||
max | ||
] | ||
], | ||
symbolizers: [ | ||
{ | ||
kind: "Text", | ||
label: "between min and max", | ||
} | ||
] | ||
}, | ||
{ | ||
name: 'above max', | ||
filter: [ | ||
">", | ||
value, | ||
max | ||
], | ||
symbolizers: [ | ||
{ | ||
kind: "Text", | ||
label: "above max" | ||
} | ||
] | ||
}, | ||
{ | ||
name: "below min", | ||
filter: [ | ||
"<", | ||
value, | ||
min | ||
], | ||
symbolizers: [ | ||
{ | ||
kind: "Text", | ||
label: "below min", | ||
} | ||
] | ||
} | ||
] | ||
} | ||
|
||
export default filterComparisonPropertyFunction; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters