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

    Interface Condition

    Condition object.

    • key: [See NestedKey] The key to pull the value from the properties to compare
    • comparator: [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 against

    When creating conditionals, you have two ways to do it:

    { "filter": { "key": "type", "comparator": "in", "value": ["ocean", "lake"] } }

    ## 2. filterCondition

    ```json
    { "filter": { "and": [{ "key": "class", "comparator": "==", "value": "ocean" }, { "key": "size", "comparator": "==", "value": "large" }, { "key": "type", "comparator": "!=", "value": "pacific" }] } }

    Sometimes vector data's properties are complex objects. To access nested fields, you can simulate dot notation:

    { "filter": { "key": { "nestedKey": ["class", "type"] }, "comparator": "==", "value": "ocean" } }
    
    interface Condition {
        comparator: Comparator;
        value?: NotNullOrObject;
    }
    Index

    Properties

    Properties

    comparator: Comparator

    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"

    A non null object.

    Must be an array for "in" or "!in"