SDK JS
    Preparing search index...

    Interface SpzMapLibreLayerOptions

    Configuration for SpzMapLibreLayer. id and anchor are required, plus one source — either a url to the .spz file or an already-decoded preloaded model; everything else has a default. placement is the field to reach for after those two: it presets upAxis: 'y' here, so a typical capture only needs a heading and a scale. Stray-splat culling is on by default and happens inside the default decoder — pass cullStray: false for a 1:1 faithful decode.

    interface SpzMapLibreLayerOptions {
        anchor: GeoAnchor;
        cullStray?: boolean | { factor?: number };
        decoder?: Decoder;
        id: string;
        onLoaded?: () => void;
        placement?: ModelPlacement;
        preloaded?: { model: DecodedModel; tiles: readonly DecodedTile[] };
        splat?: Partial<SplatOptions>;
        url?: string;
        wasmInit?: WasmHostInit;
    }
    Index

    Properties

    anchor: GeoAnchor

    Where the model sits (lng/lat/altitude). Which local point lands here is placement.anchorPoint — top/middle/bottom, origin, or an explicit point (default 'center': the capture's robust median centers on the anchor).

    cullStray?: boolean | { factor?: number }

    Cull the far-outlier "stray" splats 3DGS captures carry (ghost fog over the map) before upload — default ON; false for a 1:1 faithful decode, { factor } to tune. Forwarded to the default SpzContainerDecoder; with a custom decoder it runs as a layer-level pass over the decoded tiles instead.

    decoder?: Decoder

    Override the decoder (default: in-process SpzContainerDecoder).

    id: string

    Layer id.

    onLoaded?: () => void

    Notified once the splat cloud has streamed in.

    placement?: ModelPlacement

    Friendly placement — up-axis preset, heading/pitch/roll (degrees), scale, and anchor point (ModelPlacement); tune at runtime with SpzMapLibreLayer.setPlacement. This layer defaults upAxis to 'y' (SPZ captures come from the glTF/3DGS ecosystem, where Y-up is the dominant convention) — override per capture when needed.

    preloaded?: { model: DecodedModel; tiles: readonly DecodedTile[] }

    Render already-decoded tiles instead of fetching a URL (in-memory source).

    splat?: Partial<SplatOptions>

    Initial gaussian-splat render options (SH toggle, color mode, …); merged over the defaults.

    url?: string

    URL of the .spz file to load (any SPZ version v1–v4). Omit when supplying preloaded.

    wasmInit?: WasmHostInit

    Cross-origin wasm bootstrap for the default SpzContainerDecoder (point wasmInit at your hosted turbospz wasm). Ignored when a custom decoder is supplied.