One of "==" | "!=" | ">" | ">=" | "<" | "<=" | "in" | "!in" | "has" | "!has"
Used by the filter function to determine if a feature should be included in the render.
NOTE: "in" means "in the array" and "has" means "has the key"
ex.
{ "filter": { "key": "type", "comparator": "in", "value": ["ocean", "lake"] } }
this would be used to filter features where feature.properties.type
is either "ocean" or "lake"
ex.
{ "filter": { "key": "type", "comparator": "has", "value": "ocean" } }
this would be used to filter features where feature.properties.type
is an array that has the key "ocean"
Optional
valueA non null object.
Must be an array for "in" or "!in"
Condition object.
Properties
key
: [See NestedKey] The key to pull the value from the properties to comparecomparator
: [See Comparator] Used by the filter function to determine if a feature should be included in the render.value
: [See NotNullOrObject] optional value to compare againstWhen creating conditionals, you have two ways to do it:
1. keyCondition
Nesting
Sometimes vector data's properties are complex objects. To access nested fields, you can simulate dot notation: