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

    Interface UseMountedSourceOptions<T>Experimental

    Options for useMountedSource.

    interface UseMountedSourceOptions<T = Record<string, unknown>> {
        attribution?: string;
        beforeId?: string;
        enabled?: boolean;
        fitBounds?: boolean | { padding?: number };
        geometry?: "auto" | MapLibreGeometryKind;
        hover?: boolean | { stateKey?: string };
        layerId?: string;
        layers?: readonly Readonly<Record<string, unknown>>[];
        layout?: Partial<
            Readonly<
                Record<
                    MapLibreGeometryKind
                    | "polygonOutline",
                    Readonly<Record<string, unknown>>,
                >,
            >,
        >;
        maxGeoJsonFeatures?: number;
        onDiagnostics?: (diagnostics: MountedSourceDiagnostics) => void;
        onError?: (error: unknown) => void;
        paint?: Partial<
            Readonly<
                Record<
                    MapLibreGeometryKind
                    | "polygonOutline",
                    Readonly<Record<string, unknown>>,
                >,
            >,
        >;
        popup?: MountSourcePopupOptions;
        query?: Readonly<Omit<Query<T>, "signal">>;
        queryTiles?: QueryTileSourceDescriptor<T>;
        renderer?: Renderer;
        sourceId?: string;
        sourceLayer?: string;
        strategy?: DataToMapStrategy;
    }

    Type Parameters

    • T = Record<string, unknown>

    Hierarchy

    Index

    Properties

    attribution?: string

    Attribution override; defaults to the source descriptor's attribution.

    beforeId?: string

    Existing layer id to insert the bridge layers before.

    enabled?: boolean

    When false, nothing is mounted (and any existing mount is disposed). Default true.

    fitBounds?: boolean | { padding?: number }

    Fit the map to the mounted data (GeoJSON bbox or tile descriptor bounds).

    geometry?: "auto" | MapLibreGeometryKind

    Restrict default styling to one geometry kind, or "auto" (default) to install the stable point/line/polygon(+outline) matrix so filter changes can move between geometry kinds without structural layer churn.

    hover?: boolean | { stateKey?: string }

    Toggle a boolean feature-state key (default "hover") while the pointer is over a feature. Requires event and feature-state map methods, and feature ids (schema.primaryKey or GeoJSON feature ids).

    layerId?: string

    Base layer id; geometry suffixes (-point, -line, …) are appended. Defaults to the source id.

    layers?: readonly Readonly<Record<string, unknown>>[]

    Full layer override: the bridge adds these layers verbatim (injecting source, and source-layer for the tile strategy, when absent) instead of the geometry-appropriate defaults. Each entry must carry a unique id.

    layout?: Partial<
        Readonly<
            Record<
                MapLibreGeometryKind
                | "polygonOutline",
                Readonly<Record<string, unknown>>,
            >,
        >,
    >

    Per-geometry layout overrides.

    maxGeoJsonFeatures?: number

    Bound (and result-size heuristic threshold) for GeoJSON materialization. Truncation is reported through MountedSourceDiagnostics.overflow.

    10000
    
    onDiagnostics?: (diagnostics: MountedSourceDiagnostics) => void

    Called with fresh diagnostics after the mount and after every applied update.

    onError?: (error: unknown) => void

    Called when mounting or a diff update fails (aborted mounts are silent).

    paint?: Partial<
        Readonly<
            Record<
                MapLibreGeometryKind
                | "polygonOutline",
                Readonly<Record<string, unknown>>,
            >,
        >,
    >

    Per-geometry paint overrides merged over the defaults.

    Open a popup on layer click. Requires map.on/map.off.

    query?: Readonly<Omit<Query<T>, "signal">>

    Initial filter applied to the mounted data. Replaced by setFilter.

    Dynamic query-tile source descriptor enabling the "query-tiles" strategy (see @honua/sdk-js/runtime query-tile helpers). Without it the bridge can only materialize GeoJSON, even when the source declares the tiles capability.

    renderer?: Renderer

    First-class renderer object from @honua/sdk-js/style (classBreaksRenderer, uniqueValueRenderer, heatmapRenderer, clusterRenderer). Layers and paint derive from the renderer instead of the geometry defaults; paint/layout overrides still win per property. A cluster renderer additionally configures GeoJSON-source clustering and requires the "geojson" strategy. Mutually exclusive with layers. Swap at runtime with MountedSource.setRenderer.

    sourceId?: string

    MapLibre source id.

    honua-<descriptor id>

    sourceLayer?: string

    Vector source-layer for the tile strategy. Defaults to the tile descriptor's sourceId.

    Force a strategy instead of capability + result-size selection. "query-tiles" requires MountSourceOptions.queryTiles.