SDK JS
    Preparing search index...

    Interface SliceWidgetOptions

    Configuration for SliceWidget. Every field is optional except the layers/controller wiring: provide controller (preferred when the app already created one), or clipping, or plain layers — with none of the three the widget still renders and dispatches events, but nothing in the scene is clipped.

    interface SliceWidgetOptions {
        clipping?: ClippingController;
        controller?: SliceController;
        defaultCollapsed?: boolean;
        layers?: readonly ClippableLayer[];
        pickPosition?: (
            x: number,
            y: number,
        ) => { height: number; lat: number; lng: number } | null;
        planeSizeM?: number;
        showPlane?: boolean;
    }
    Index

    Properties

    An existing scene ClippingController — the widget creates its own SliceController over it.

    controller?: SliceController

    An existing headless SliceController to drive (the fully-wired path).

    defaultCollapsed?: boolean

    Start collapsed to a round ◪ button (expand on click; the header's ▢ re-collapses). Every other widget in the SDK has this; these two did not, so a corner shared with them could not be tidied. Default false.

    layers?: readonly ClippableLayer[]

    Convenience: the 3D layers to slice (a controller is created over them).

    pickPosition?: (
        x: number,
        y: number,
    ) => { height: number; lat: number; lng: number } | null

    Screen → scene position picker used to place the plane where the user clicks on 3D content (x/y in CSS pixels relative to the map canvas; returns lng/lat degrees + height metres, or null on a miss). Without it — or on a miss — the plane is placed on the terrain/basemap under the cursor (map.unproject + queryTerrainElevation).

    planeSizeM?: number

    Initial slice half-width in metres (default 300; the depth defaults to 2×). Resize live with the on-map edge handles or the panel sliders.

    showPlane?: boolean

    Show the semi-transparent plane visual + ground footprint (default true).