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

    Interface DataRangeStep<T>

    Data Range Step

    Data Range Step is used to group features based on a range of values and apply specific design attributes for those groups. If the feature's value falls within the range, the fallback is used.

    The "step" type is more limited than an ease type, often used by LAYOUT styling where the change is immediate to each stop.

    ex.

    "opacity": {
    "inputRange": {
    "type": "zoom",
    "ease": "step",
    "ranges": [
    { "stop": 0, "input": 1 },
    { "stop": 5, "input": 0 }
    ]
    }
    }
    • ease: Must be "step" if provided
    • key: [See NestedKey] Access value in feature properties by either its key or a nested key.
    • ranges: [See Range] Set the range stops and the input values to apply at those stops.
    interface DataRangeStep<T extends NotNullOrObject> {
        base?: number;
        key: string | NestedKey;
        ranges: Range<T>[];
    }

    Type Parameters

    Index

    Properties

    Properties

    base?: number

    Unused by "step" ease functions. Kept to avoid errors in Typescript

    key: string | NestedKey

    Access value in feature properties by either its key or a nested key.

    If the key is class for example, this would be used to filter feature's values where feature.properties.class === 'ocean'

    ex.

    { "filter": { "key": "class", "comparator": "==", "value": "ocean" } }
    

    nested conditions are used to dive into nested properties, for example if we want our feature properties comparsion to look like: feature.properties.class.type === 'ocean'

    ex.

    { "filter": { "key": { "nestedKey": ["class", "type"] }, "comparator": "==", "value": "ocean" } }
    

    this would be used to filter features where feature.properties.class.type === 'ocean'

    ranges: Range<T>[]

    Set the range stops and the input values to apply at those stops. See Range

    ex.

    "ranges": [
    { "stop": 0, "input": 0 },
    { "stop": 5, "input": 0.5 },
    { "stop": 8, "input": 1 }
    ]