s2maps-gpu - v0.18.0
    Preparing search index...

    Interface DataCondition<T>

    Data Condition

    Data conditions are used to filter features based on what property values the feature has.

    • If the condition's filter passes, the input is used.
    • If all conditions fail, the fallback is used.
    • Input value must be at a minimum a NotNullOrObject
    • conditions: [See ConditionFilter] array of { filter: Filter, input: T | Property<T> }. If Filter passes, the input is used
    • fallback: if all else fails, use this value. A value of T itself or pull from feature properties using Property

    ex.

    "color": {
    "dataCondition": {
    "conditions": [
    {
    "filter": { "key": "country", "comparator": "==", "value": "US" },
    "input": "#007bfe"
    }
    ],
    "fallback": "#23374d"
    }
    }
    interface DataCondition<T extends NotNullOrObject> {
        conditions: ConditionFilter<T>[];
        fallback: T | Property<T>;
    }

    Type Parameters

    Index

    Properties

    Properties

    conditions: ConditionFilter<T>[]

    conditions is an array of { filter: Filter, input: T | Property<T> } If the filter passes, the input is used.

    fallback: T | Property<T>

    If the conditional search fails, the fallback is used.