For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.

Class SymbolStyleLayer

A base class for style layers

Hierarchy (View Summary)

Index

Constructors

Properties

filter: void | FilterSpecification
id: string
maxzoom: number
metadata: unknown
minzoom: number
onAdd: (map: MapMLGL) => void
onRemove: (map: MapMLGL) => void
source: string
sourceLayer: string
type:
    | "symbol"
    | "line"
    | "custom"
    | "circle"
    | "fill"
    | "heatmap"
    | "fill-extrusion"
    | "raster"
    | "hillshade"
    | "color-relief"
    | "background"

Methods

  • Get list of global state references that are used within layout or filter properties. This is used to determine if layer source need to be reloaded when global state property changes.

    Returns Set<string>

  • Parameters

    Returns any

  • Get list of global state references that are used within visibility expression. This is used to determine if layer visibility needs to be updated when global state property changes.

    Returns Set<string>

  • Parameters

    • Optionalzoom: number
    • OptionalroundMinZoom: boolean

    Returns boolean

  • Returns a true if this instance of Evented or any forwardeed instances of Evented have a listener for the specified type.

    Parameters

    • type: "error"

      The event type

    Returns boolean

    true if there is at least one registered listener for specified event type, false otherwise

  • Removes a previously registered event listener.

    Type Parameters

    • T extends "error"

    Parameters

    • type: T

      The event type to remove listeners for.

    • listener: (event: ErrorEventType[T]) => void

      The listener function to remove.

    Returns this

  • Adds a listener to a specified event type.

    Type Parameters

    • T extends "error"

    Parameters

    • type: T

      The event type to add a listen for.

    • listener: (event: ErrorEventType[T]) => void

      The function to be called when the event is fired. The listener function is called with the data object passed to fire, extended with target and type properties.

    Returns Subscription

  • Adds a listener that will be called only once to a specified event type.

    The listener will be called first time the event fires after the listener is registered.

    Type Parameters

    • T extends "error"

    Parameters

    • type: T

      The event type to listen for.

    Returns Promise<ErrorEventType[T]>

    a promise that resolves with the event

  • Adds a listener that will be called only once to a specified event type.

    The listener will be called first time the event fires after the listener is registered.

    Type Parameters

    • T extends "error"

    Parameters

    • type: T

      The event type to listen for.

    • listener: (event: ErrorEventType[T]) => void

      The function to be called when the event is fired the first time.

    Returns this

    this when a listener is provided

  • The re-read itself goes through setPaintProperty, which also rebuilds colour ramps and relayouts.

    Parameters

    • refs: string[]
    • priorGlobalState: Record<string, any>

    Returns void

Was this helpful?