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

    Interface HonuaSourceLayerProps<T>Experimental

    Props for HonuaSourceLayer.

    interface HonuaSourceLayerProps<T = Record<string, unknown>> {
        attribution?: string;
        beforeId?: string;
        enabled?: boolean;
        fitBounds?: boolean | { padding?: number };
        hover?: boolean | { stateKey?: string };
        layerId?: string;
        map?: DataToMapLibreMap | null;
        maxGeoJsonFeatures?: number;
        onDiagnostics?: (diagnostics: MountedSourceDiagnostics) => void;
        onError?: (error: unknown) => void;
        popup?: MountSourcePopupOptions;
        query?: Readonly<Omit<Query<T>, "signal">>;
        queryTiles?: QueryTileSourceDescriptor<T>;
        renderer?: Renderer | HonuaSourceRenderer<T>;
        selection?: boolean | { multiSelect?: boolean; stateKey?: string };
        source: Source<T> | null | undefined;
        sourceId?: string;
        sourceLayer?: string;
        strategy?: DataToMapStrategy;
    }

    Type Parameters

    • T = Record<string, unknown>
    Index

    Properties

    attribution?: string

    Attribution override.

    beforeId?: string

    Existing layer id to insert the bridge layers before.

    enabled?: boolean

    When false, nothing is mounted.

    true
    
    fitBounds?: boolean | { padding?: number }

    Fit the map to the mounted data.

    hover?: boolean | { stateKey?: string }

    Toggle hover feature-state on the mounted layers (bridge hover option).

    layerId?: string

    Base layer id override; geometry suffixes are appended.

    map?: DataToMapLibreMap | null

    Target map. Omit to resolve the nearest enclosing HonuaMap / HonuaMapProvider (external-map interop).

    maxGeoJsonFeatures?: number

    GeoJSON materialization bound.

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

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

    onError?: (error: unknown) => void

    Called when mounting or an update fails.

    Open a popup on feature click (factory usually () => new maplibregl.Popup()).

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

    Filter applied to the mounted data; changes diff via setFilter.

    Dynamic query-tile descriptor enabling the tile strategy.

    Styling: either a first-class renderer object from @honua/sdk-js/style (diffed via setRenderer) or a HonuaSourceRenderer bag of geometry restriction + paint/layout overrides or custom layers.

    selection?: boolean | { multiSelect?: boolean; stateKey?: string }

    Share feature selection with the enclosing HonuaSelectionProvider: clicks toggle the shared selection and the shared selection is mirrored onto feature-state (default key "selected"). Also publishes hover to the provider when hover is enabled. No-op without a provider.

    source: Source<T> | null | undefined

    The contract Source to mount. null while it is still resolving.

    sourceId?: string

    MapLibre source id override.

    honua-<descriptor id>

    sourceLayer?: string

    Vector source-layer for the tile strategy.

    Force a bridge strategy ("geojson" / "query-tiles").