Data conditions are used to filter features based on what property values the feature has.
conditions
{ filter: Filter, input: T | Property<T> }
fallback
T
ex.
"color": { "dataCondition": { "conditions": [ { "filter": { "key": "country", "comparator": "==", "value": "US" }, "input": "#007bfe" } ], "fallback": "#23374d" }} Copy
"color": { "dataCondition": { "conditions": [ { "filter": { "key": "country", "comparator": "==", "value": "US" }, "input": "#007bfe" } ], "fallback": "#23374d" }}
conditions is an array of { filter: Filter, input: T | Property<T> } If the filter passes, the input is used.
If the conditional search fails, the fallback is used.
Data Condition
Data conditions are used to filter features based on what property values the feature has.
Properties:
conditions
: [See ConditionFilter] array of{ filter: Filter, input: T | Property<T> }
. If Filter passes, the input is usedfallback
: if all else fails, use this value. A value ofT
itself or pull from feature properties using Propertyex.