SDK JS
    Preparing search index...

    Interface MeasurementWidgetOptions

    Configuration for MeasurementWidget. All fields optional — with no pickLayers the tool measures on the terrain/basemap only.

    interface MeasurementWidgetOptions {
        bulkDensityTperM3?: number;
        defaultCollapsed?: boolean;
        groundShadow?: boolean;
        modes?: readonly MeasureMode[];
        pickLayers?: readonly PositionPickable[];
        showFillMap?: boolean;
        showSegmentDetails?: boolean;
        snapRadiusPx?: number;
        units?: UnitSystem;
        volumeUnit?: VolumeUnit;
    }
    Index

    Properties

    bulkDensityTperM3?: number

    Bulk density (t/m³) used when the Volume unit is tonnes (default 1.6, a loose aggregate); the Volume panel exposes a live density field while tonnes is selected.

    defaultCollapsed?: boolean

    Start collapsed to a round 📏 button (expand on click; the header's ▢ re-collapses). Default false (expanded).

    groundShadow?: boolean

    Also drape a ground-track shadow (dashed line, area fill, cursor dot) on the terrain under the 3D measurement (default false). The true-3D graphics — vertex sprites at their real heights, 3D segments, and vertical droplines to the ground — always render.

    modes?: readonly MeasureMode[]

    Which mode buttons to offer (default all three).

    pickLayers?: readonly PositionPickable[]

    3D layers whose surfaces measurements snap to (any layer exposing pickPosition, e.g. the mesh layers). Empty/omitted → terrain-only.

    showFillMap?: boolean

    Start with the Volume "fill map" (heatmap + contour lines) on (default false); Volume mode has a live "Fill map" checkbox. Contours step by 1 m (metric) / 1 ft (imperial), following the unit toggle.

    showSegmentDetails?: boolean

    Show the per-segment breakdown table in distance mode (default true).

    snapRadiusPx?: number

    Mesh snap radius in CSS pixels (default 0 — the vertex lands EXACTLY on the clicked surface pixel, "point-shot"). Raise it (e.g. 8) to snap near-miss clicks onto the nearest 3D surface within the radius (screen-nearest, depth-blind — an edge-click rescue at the cost of possible pulls onto a different surface). Adjustable live via MeasurementWidget.setSnapRadius.

    units?: UnitSystem

    Initial unit system (default 'metric'); the panel has a live toggle.

    volumeUnit?: VolumeUnit

    Initial Volume-readout unit (default: 'yd3' when units is imperial, else 'm3'). Volume mode has its own live dropdown, independent of the metric/imperial length toggle.