Skip to content

spatial-monorepo


spatial-monorepo / core/src / SpatialProviderProps

Interface: SpatialProviderProps

Defined in: packages/core/src/provider.tsx:142

Properties

children

children: ReactNode

Defined in: packages/core/src/provider.tsx:143


errorBoundary?

optional errorBoundary?: boolean | ComponentType`<{ error: Error; }>`

Defined in: packages/core/src/provider.tsx:145


iframeMessaging?

optional iframeMessaging?: object

Defined in: packages/core/src/provider.tsx:171

Issue #270 — Convenience prop for the built-in iFrame messaging plugin. When provided, createIFrameMessagingPlugin is registered automatically. Changing allowedOrigins tears down the old plugin instance and registers a fresh one. Removing the prop tears down the plugin.

allowedOrigins

allowedOrigins: string[]


optional initialShareLink?: string

Defined in: packages/core/src/provider.tsx:155

URL-safe share link hash produced by generateShareLink(). Hydrates camera, floor, and layer state on mount.


locale?

optional locale?: SupportedLocale

Defined in: packages/core/src/provider.tsx:173

Issue #310 — Active UI locale (F60). Wraps children with I18nProvider.


messages?

optional messages?: Partial`<Record<"floor-switcher.label" | "floor-switcher.floor-label" | "floor-switcher.explode" | "search-bar.placeholder" | "search-bar.aria-label" | "space-card.close" | "directions-panel.close" | "directions-panel.floor-change" | "directions-panel.action.depart" | "directions-panel.action.turn-left" | "directions-panel.action.turn-right" | "directions-panel.action.slight-left" | "directions-panel.action.slight-right" | "directions-panel.action.turn-left-landmark" | "directions-panel.action.turn-right-landmark" | "directions-panel.action.slight-left-landmark" | "directions-panel.action.slight-right-landmark" | "directions-panel.action.continue" | "directions-panel.action.arrive" | "directions-panel.action.take-connection" | "directions-panel.action.exit-connection" | "directions-panel.via.elevator" | "directions-panel.via.stairs" | "directions-panel.via.ramp" | "directions-panel.via.escalator" | "directions-panel.step-aria" | "wayfinding-panel.close" | "kiosk.search-placeholder" | "kiosk.search-aria" | "paste-toolbar.cancel" | "accessible-route.label" | "fit-control.label" | "compass.label" | "building-selector.label" | "category-filter.label" | "category-filter.all" | "export-panel.title" | "export-panel.download" | "export-panel.close" | "mode-toggle.2d" | "mode-toggle.3d" | "map-tour.pause" | "map-tour.play" | "map-tour.stop", string>>`

Defined in: packages/core/src/provider.tsx:175

Issue #310 — Partial message overrides merged into the active locale.


onZoomModeChange?

optional onZoomModeChange?: (mode) => void

Defined in: packages/core/src/provider.tsx:180

Issue #373 — Fired when the map transitions between zoom modes. "indoor" when zoom ≥ 18, "overview" when zoom < 18.

Parameters

mode

"overview" | "indoor"

Returns

void


persist?

optional persist?: object

Defined in: packages/core/src/provider.tsx:146

key

key: string

version

version: number


plugins?

optional plugins?: SpatialPlugin[]

Defined in: packages/core/src/provider.tsx:164

First-party and third-party plugins. Installed after the MapLibre map fires 'load'; destroyed on unmount. If this array's identity changes on a later render (e.g. because iframeMessaging.allowedOrigins changed, or a custom plugin set was recomputed), the previous plugin controllers are destroyed and the new set is installed (Issue #440). Pass a stable/memoized array (e.g. via useMemo) if plugins should not be reinstalled on every render.


prefetch?

optional prefetch?: boolean | PrefetchOptions

Defined in: packages/core/src/provider.tsx:194

Issue #411 — Tile prefetching (PRD F61). When true, SpatialMap prefetches tiles for the next floor on floor-change using the current map viewport bounds and zoom ±2 levels. Pass a PrefetchOptions object to override bounds, zoom range, or maxBytes. Default: false.


theme?

optional theme?: Theme

Defined in: packages/core/src/provider.tsx:144


venueBounds?

optional venueBounds?: VenueBounds

Defined in: packages/core/src/provider.tsx:186

Issue #372 — Optional bounding box that prevents the map from panning or zooming outside the given lat/lon bounds. Format: [[minLng, minLat], [maxLng, maxLat]]. When omitted, map panning is unrestricted.


worker?

optional worker?: object

Defined in: packages/core/src/provider.tsx:147

imdf?

optional imdf?: boolean

rtls?

optional rtls?: boolean

wallBands?

optional wallBands?: boolean

Issue #468 — Whether to run wall-band geometry generation in a dedicated Worker. Default: true.

wayfinding?

optional wayfinding?: boolean

Released under commercial licensing.