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

    Interface LayerStyleBase<M>

    Base Layer

    The base layer style. Used by almost all layers to define common attributes.

    • name: the name of the layer, useful for sorting a layer on insert or for removal
    • source: the name of the source whose data this layer will use
    • layer: the source's layer. Defaults to "default" for JSON data
    • minzoom: the minimum zoom level at which the layer will be visible
    • maxzoom: the maximum zoom level at which the layer will be visible
    • filter: [See Filter] a filter function to filter out features from the source layer
    • lch: use LCH coloring instead of RGB. Useful for color changing when the new color is very different from the old one
    • visible: whether the layer is visible or not
    • metadata: additional metadata. Used by style generators
    interface LayerStyleBase<M = unknown> {
        filter?: Filter;
        layer?: string;
        lch?: boolean;
        maxzoom?: number;
        metadata?: M;
        minzoom?: number;
        name?: string;
        source?: string;
        visible?: boolean;
    }

    Type Parameters

    • M = unknown

    Hierarchy (View Summary)

    Index

    Properties

    filter?: Filter

    A filter function to filter out features from the source layer.

    example:

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

    another example:

    "filter": {
    "or": [
    { "key": "class", "comparator": "==", "value": "ocean" },
    { "key": "class", "comparator": "==", "value": "bay" }
    ]
    }

    another example:

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

    The source's layer. Default for JSON data

    lch?: boolean

    Use LCH coloring instead of RGB. Useful for color changing when the new color is very different from the old one

    maxzoom?: number

    The maximum zoom level at which the layer will be visible

    metadata?: M

    Additional metadata. Used by style generators.

    minzoom?: number

    The minimum zoom level at which the layer will be visible

    name?: string

    The name of the layer - useful for sorting a layer on insert or for removal

    source?: string

    The source used to generate the layer

    visible?: boolean

    Whether the layer is visible or not