@honua/sdk-js
    Preparing search index...

    Interface MountedSource<T>Experimental

    Live handle returned by mountSource. Owns every MapLibre resource the bridge created (source, layers, event listeners); dispose() is idempotent and removes all of them.

    interface MountedSource<T = Record<string, unknown>> {
        diagnostics: MountedSourceDiagnostics;
        layerIds: readonly string[];
        sourceId: string;
        sourceLayer?: string;
        state: "ready" | "disposed";
        strategy: DataToMapStrategy;
        "[asyncDispose]"(): PromiseLike<void>;
        dispose(): void;
        refresh(): Promise<MountedSourceDiagnostics>;
        setFilter(
            query: Readonly<Omit<Query<T>, "signal">> | undefined,
        ): Promise<MountedSourceDiagnostics>;
        setRenderer(
            renderer: Renderer | undefined,
        ): Promise<MountedSourceDiagnostics>;
    }

    Type Parameters

    • T = Record<string, unknown>

    Hierarchy

    • AsyncDisposable
      • MountedSource
    Index

    Properties

    layerIds: readonly string[]
    sourceId: string
    sourceLayer?: string

    Resolved vector source-layer used by the mounted layers — the explicit option, or the default derived from the query-tile descriptor. Always undefined for the GeoJSON strategy. Feature-state operations against a vector tile source must target this same value.

    state: "ready" | "disposed"

    Methods

    • Experimental

      Returns PromiseLike<void>

    • Experimental

      Swap the mounted renderer and diff-update in place where MapLibre allows: when the layer structure is unchanged, paint/layout/filter are updated per property (setPaintProperty/setLayoutProperty/ setFilter) without layer teardown; a structural change (e.g. to or from a cluster/heatmap renderer) recreates only the owned layers, and changed GeoJSON cluster options recreate the source. Passing undefined restores the geometry-default styling.

      Parameters

      Returns Promise<MountedSourceDiagnostics>