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

    Interface HeatmapStyle

    Heatmap Layer Guide

    [See LayerStyleBase]

    • 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

    Optional paint properties:

    • radius: the radius of the heatmap in pixels
    • opacity: the opacity of the heatmap. Choose between [0, 1], or pull out the value using a Property.
    • intensity: the intensity of the heatmap
    • weight: A weight multiplier to apply to each of the heatmap's points
    • geoFilter: [See GeoFilter] filter the geometry types that will be drawn.
    • colorRamp: [See ColorRamp] Build a interpolation ramp to help the sensor data be converted into RGBA. May be sinebow or sinebow-extended
    interface HeatmapStyle {
        colorRamp?: ColorRamp;
        filter?: Filter;
        geoFilter?: GeoFilters;
        intensity?: number | Property<number>;
        layer?: string;
        lch?: boolean;
        maxzoom?: number;
        metadata?: unknown;
        minzoom?: number;
        name?: string;
        opacity?: number | Property<number>;
        radius?: number | Property<number>;
        source?: string;
        type: "heatmap";
        visible?: boolean;
        weight?: number | Property<number>;
    }

    Hierarchy (View Summary)

    Index

    Properties

    colorRamp?: ColorRamp

    Define a color ramp to be used for a feature

    sinebow.

    ex.

    {
    "colorRamp": [
    { "stop": 0, "color": "rgba(33,102,172,0)" },
    { "stop": 0.2, "color": "rgba(103,169,207, 0.85)" },
    { "stop": 0.4, "color": "rgb(209,229,240)" },
    { "stop": 0.6, "color": "rgb(253,219,199)" },
    { "stop": 0.8, "color": "rgb(239,138,98)" },
    { "stop": 1, "color": "rgb(178,24,43)" }
    ]
    }
    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" }
    ]
    }
    geoFilter?: GeoFilters

    Filter the geometry types that will be drawn. An empty array will support all geometry types. Ex. ["line"]: only draw lines Defaults to ['line', 'poly'] (only points will be drawn).

    intensity?: number | Property<number>

    A PAINT Property.

    1

    ex.

    { "intensity": 2.5 }
    

    ex.

    { "intensity": { "inputValue": { "key": "strength", "fallback": 1 } } }
    
    • inputValue: [See InputValue] access value in feature properties
    • dataCondition: [See DataCondition] filter based on feature property conditions
    • dataRange: [See DataRange] filter based on feature property ranges
    • inputRange: [See InputRange] filter based on map conditions like "zoom", "lon", "lat", "angle", or "pitch"
    • featureState: [See FeatureState] filter based on feature state
    • fallback: if all else fails, use this value. A value of number itself or pull from feature properties using Property
    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?: unknown

    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

    opacity?: number | Property<number>

    A PAINT Property.

    1

    ex.

    { "opacity": 0.5 }
    

    ex.

    { "opacity": { "inputValue": { "key": "opacity", "fallback": 1 } } }
    
    • inputValue: [See InputValue] access value in feature properties
    • dataCondition: [See DataCondition] filter based on feature property conditions
    • dataRange: [See DataRange] filter based on feature property ranges
    • inputRange: [See InputRange] filter based on map conditions like "zoom", "lon", "lat", "angle", or "pitch"
    • featureState: [See FeatureState] filter based on feature state
    • fallback: if all else fails, use this value. A value of number itself or pull from feature properties using Property
    radius?: number | Property<number>

    A PAINT Property.

    1

    ex.

    { "radius": 5 } }
    

    ex.

    { "radius": { "inputValue": { "key": "size", "fallback": 3.5 } } }
    
    • inputValue: [See InputValue] access value in feature properties
    • dataCondition: [See DataCondition] filter based on feature property conditions
    • dataRange: [See DataRange] filter based on feature property ranges
    • inputRange: [See InputRange] filter based on map conditions like "zoom", "lon", "lat", "angle", or "pitch"
    • featureState: [See FeatureState] filter based on feature state
    • fallback: if all else fails, use this value. A value of number itself or pull from feature properties using Property
    source?: string

    The source used to generate the layer

    type: "heatmap"

    Heatmap Layer Guide

    Base Properties:

    • 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
    • radius: the radius of the heatmap in pixels
    • opacity: the opacity of the heatmap. Choose between [0, 1], or pull out the value using a Property.
    • intensity: the intensity of the heatmap
    • weight: A weight multiplier to apply to each of the heatmap's points
    • geoFilter: [See GeoFilter] filter the geometry types that will be drawn. Options are point, line, poly.
    • colorRamp: [See ColorRamp] Build a interpolation ramp to help the sensor data be converted into RGBA. May be sinebow or sinebow-extended
    visible?: boolean

    Whether the layer is visible or not

    weight?: number | Property<number>

    A PAINT Property.

    1

    ex.

    { "weight": 2.5 }
    

    ex.

    { "weight": { "inputValue": { "key": "impact", "fallback": 1 } } }
    
    • inputValue: [See InputValue] access value in feature properties
    • dataCondition: [See DataCondition] filter based on feature property conditions
    • dataRange: [See DataRange] filter based on feature property ranges
    • inputRange: [See InputRange] filter based on map conditions like "zoom", "lon", "lat", "angle", or "pitch"
    • featureState: [See FeatureState] filter based on feature state
    • fallback: if all else fails, use this value. A value of number itself or pull from feature properties using Property