Skip to content

spatial-monorepo


spatial-monorepo / editor/src / SpatialEditorProps

Interface: SpatialEditorProps

Defined in: packages/editor/src/SpatialEditor.tsx:70

Properties

building?

optional building?: object

Defined in: packages/editor/src/SpatialEditor.tsx:86

Issue #782 — homography is the source building's row-major 3×3 matrix (same shape as BuildingOption.homography), used as srcHomography for copy-to-building's cross-building reprojection.

homography?

optional homography?: number[]

id

id: string

name?

optional name?: string


buildings?

optional buildings?: BuildingOption[]

Defined in: packages/editor/src/SpatialEditor.tsx:103

Buildings available for copy-to-building (F17 / issue #185).


children?

optional children?: ReactNode

Defined in: packages/editor/src/SpatialEditor.tsx:113


floors?

optional floors?: Floor[]

Defined in: packages/editor/src/SpatialEditor.tsx:101

Floors available for copy-to-floor (F16).


initialMode?

optional initialMode?: EditorMode

Defined in: packages/editor/src/SpatialEditor.tsx:90


map?

optional map?: Map$1 | null

Defined in: packages/editor/src/SpatialEditor.tsx:82

The MapLibre map instance the editor draws on. Wall/door/fixture clicks, Terra Draw's drawing modes, the image-snap floor-plan drop, and the OSM outline / wall-extrusion layers all no-op without one.

Issue #427 — policy default: when omitted, SpatialEditor falls back to useSpatialMap() so it can be embedded directly inside a <SpatialMap> without any extra wiring. An explicit map prop always takes precedence over the context value, so SpatialEditor also works standalone (e.g. in Storybook, or against a map mounted outside of <SpatialMap>).


onFloorPlanAlphaChange?

optional onFloorPlanAlphaChange?: (alpha) => void

Defined in: packages/editor/src/SpatialEditor.tsx:97

Called when the opacity slider changes (0–1).

Parameters

alpha

number

Returns

void


onFloorPlanElevationCmChange?

optional onFloorPlanElevationCmChange?: (cm) => void

Defined in: packages/editor/src/SpatialEditor.tsx:99

Called when the elevation-in-cm input changes.

Parameters

cm

number

Returns

void


onMVFImport?

optional onMVFImport?: (archive) => void

Defined in: packages/editor/src/SpatialEditor.tsx:105

Called when an MVF file is successfully dropped and imported (issue #409).

Parameters

archive

IMDFArchive

Returns

void


onSave?

optional onSave?: (features) => void | Promise`<void>`

Defined in: packages/editor/src/SpatialEditor.tsx:87

Parameters

features

Feature`<Geometry, GeoJsonProperties>`[]

Returns

void | Promise`<void>`


onValidationFeatureClick?

optional onValidationFeatureClick?: (featureId) => void

Defined in: packages/editor/src/SpatialEditor.tsx:93

Called when a violation row is clicked — receives the featureId for click-to-zoom.

Parameters

featureId

string

Returns

void


pdfWorkerSrc?

optional pdfWorkerSrc?: string

Defined in: packages/editor/src/SpatialEditor.tsx:112

Override for pdfjs-dist's worker script URL, forwarded to usePDFDrop. Only needed by consumers whose bundler doesn't special-case new URL('pdfjs-dist/build/pdf.worker.min.mjs', import.meta.url) (issue #445). See usePDFDrop's pdfWorkerSrc option for details.


showAssetPanel?

optional showAssetPanel?: boolean

Defined in: packages/editor/src/SpatialEditor.tsx:89


showFloorPlanControls?

optional showFloorPlanControls?: boolean

Defined in: packages/editor/src/SpatialEditor.tsx:95

Show floor-plan opacity + elevation controls (for use alongside HomographyLayer).


showLayerPanel?

optional showLayerPanel?: boolean

Defined in: packages/editor/src/SpatialEditor.tsx:88


validation?

optional validation?: "none" | "microsoft-places" | "apple-imdf"

Defined in: packages/editor/src/SpatialEditor.tsx:91

Released under commercial licensing.