SDK JS
    Preparing search index...

    Interface I3sBuildingLayerOptions

    Configuration for I3sBuildingLayer. Only id + url are required; everything else has a sensible default for a public, geographic Building Scene Layer.

    interface I3sBuildingLayerOptions {
        attribution?: string;
        auth?: RequestAuthorizer;
        budget?: { maxBytes?: number };
        center?: [number, number];
        clippingPlanes?: ClippingPlanesOptions;
        datum?: VerticalDatum;
        geoidN?: number;
        id: string;
        lodBias?: number;
        occludeTerrain?: boolean;
        onError?: (error: unknown) => void;
        onLoaded?: () => void;
        onProgress?: (fraction: number) => void;
        opacity?: number;
        poolSize?: number;
        requestInit?: RequestInit;
        shadows?:
            | boolean
            | {
                bias?: number;
                cascadeCount?: number;
                mapSize?: number;
                maxDistance?: number;
                normalScale?: number;
                strength?: number;
            };
        url: string;
        visible?: boolean;
        wireframe?: boolean;
        workers?: boolean;
    }
    Index

    Properties

    attribution?: string

    Dataset attribution string (readable via I3sBuildingLayer.getAttribution).

    auth?: RequestAuthorizer

    Request authorizer for secured ArcGIS services. For a secured BSL pass an ESRI authorizer (e.g. getEsriAuthorizer() from @bitruvius/esri-auth, or set one globally via configureEsriAuth() and omit this). Public services need neither this nor requestInit.

    budget?: { maxBytes?: number }

    Per-sublayer resident VRAM budget (bytes). Default 1.5 GB each (BIM sublayers are small).

    center?: [number, number]

    Anchor center [lng, lat] (degrees) for a planet-scale root (else the map center / sublayer root).

    clippingPlanes?: ClippingPlanesOptions

    Clipping planes (geographic; see ClippingPlanesOptions) applied to the building's geometry across all sublayers. Fragments on the clipped side are discarded from the color, pick, and shadow-cast passes. Change at runtime via I3sBuildingLayer.setClippingPlanes. Default none.

    Vertical datum for placement. Default: inherited from the sublayer's declared vertical CRS (vcsWkid — e.g. EGM96 5773 → 'orthometric') when a geoid is available, else 'basemap' (drape on the map / 3D terrain). Pass an explicit value to override the inheritance. See VerticalDatum.

    geoidN?: number

    Optional — you should not normally need this.* The geoid undulation N (m) at the dataset, used to place absolutely-georeferenced data on mean-sea-level terrain. The SDK resolves it automatically (it fetches the EGM96 grid on demand and samples it at the dataset), so pass this only to override that — e.g. for a dataset referenced to a local vertical datum EGM96 does not model.

    An override shifts placement by the DIFFERENCE between your value and the EGM96 undulation at the dataset — so passing the conventional EGM96 value for your area is a no-op rather than a ~30 m jump.

    id: string

    MapLibre layer id (must be unique within the map).

    lodBias?: number

    LOD quality bias on the refine threshold (default 1, faithful to the service). >1 refines LESS (coarser, lighter VRAM/streaming); <1 sharper.

    occludeTerrain?: boolean

    Let MapLibre's existing depth OCCLUDE this model — terrain and any 3D layer already drawn will hide the parts of the building behind them. Defaults to on whenever the map has 3D terrain.

    Without it the renderer CLEARS the depth buffer before drawing, so the model paints over everything: a BIM building set among city mesh buildings showed straight through them, which is exactly backwards for a model sitting inside its neighbourhood. The mesh layers have taken this since e688325; the Building Scene Layer never got it.

    Set false deliberately for the draw-over behaviour — a proposed design that must stay visible through the existing context.

    onError?: (error: unknown) => void

    Fired if the building fails to load/initialize (e.g. an unauthorized service). The layer stays inert; nothing renders.

    onLoaded?: () => void

    Fired once every visible sublayer's working set has first fully streamed.

    onProgress?: (fraction: number) => void

    Fired with the working-set load fraction (0–1) as it streams.

    opacity?: number

    Initial opacity 0–1 (default 1) — fade the whole building over the basemap.

    poolSize?: number

    Worker pool size (worker mode only). Defaults to the decoder's own default.

    requestInit?: RequestInit

    Static auth/headers escape hatch (e.g. a Bearer token) for tile + metadata fetches. Superseded by auth when both are set.

    shadows?:
        | boolean
        | {
            bias?: number;
            cascadeCount?: number;
            mapSize?: number;
            maxDistance?: number;
            normalScale?: number;
            strength?: number;
        }

    Cast real sun shadows (depth-from-sun shadow map) across the building's sublayers. Default false. Needs a sun via I3sBuildingLayer.setSunState; untextured BIM elements also receive direct sun. Pass an object to tune the shadow map.

    url: string

    SceneServer or building-layer URL (…/SceneServer or …/SceneServer/layers/{id}).

    visible?: boolean

    Initial visibility (default true). Toggle live with I3sBuildingLayer.setVisible.

    wireframe?: boolean

    Stream the uncompressed PAA geometry (non-indexed) so I3sBuildingLayer.setWireframe works on ALL sublayers, including Draco-served ones (the barycentric wireframe needs non-indexed geometry). Costs more network/VRAM; decode is faster (no Draco). Default false — leave off for the most efficient solid-only view.

    workers?: boolean

    Decode tiles off the main thread in a Web Worker pool (default true). Set false to decode on the main thread (e.g. the cross-origin CDN bundle, where the module worker can't load same-origin) — the main-thread Draco decoder is used instead.