spatial-monorepo / ui/src / WayfindingPanelProps
Interface: WayfindingPanelProps
Defined in: packages/ui/src/WayfindingPanel.tsx:11
Properties
destination?
optionaldestination?:string
Defined in: packages/ui/src/WayfindingPanel.tsx:12
droppedPinCoordinate?
optionaldroppedPinCoordinate?:Position2D|null
Defined in: packages/ui/src/WayfindingPanel.tsx:15
Map-click coordinate for Dropped Pin mode (managed externally by map event handler).
findRoute?
optionalfindRoute?: (origin,destination,opts?) =>Promise`<DirectionsResult|null>`
Defined in: packages/ui/src/WayfindingPanel.tsx:26
Override for graph lookups. useWayfindingWorker() keeps its graph in a per-hook-instance ref, so a panel spawned separately from wherever the app builds its graph never sees it — pass the app's findRoute through so this panel resolves against the same graph (issue #816).
Find a route between origin and destination. Each accepts a single node id or an array (nearest-of-many by graph cost); origin also accepts null (resolved via opts.currentLocationId/opts.youAreHereMarkerId). Resolves the typed DirectionsResult union — null only when no graph has been built yet (issue #470).
Parameters
origin
string | string[] | null
destination
string | string[]
opts?
DirectionOptions
Returns
Promise`<DirectionsResult | null>`
gpsCoordinate?
optionalgpsCoordinate?:Position2D|null
Defined in: packages/ui/src/WayfindingPanel.tsx:17
GPS coordinate for Nearest Entrance mode.
onClear?
optionalonClear?: () =>void
Defined in: packages/ui/src/WayfindingPanel.tsx:18
Returns
void
onRoute?
optionalonRoute?: (route) =>void
Defined in: packages/ui/src/WayfindingPanel.tsx:19
Parameters
route
Route
Returns
void
position?
optionalposition?:ControlPosition
Defined in: packages/ui/src/WayfindingPanel.tsx:13
snapToEntrance?
optionalsnapToEntrance?: (pt) =>Promise`<string|null>`
Defined in: packages/ui/src/WayfindingPanel.tsx:30
Same override as findRoute, forwarded to the Nearest Entrance origin tab (issue #816).
Snap a [lng, lat] coordinate to the nearest entrance node id.
Parameters
pt
Position2D
Returns
Promise`<string | null>`
snapToWalkable?
optionalsnapToWalkable?: (pt) =>Promise`<string|null>`
Defined in: packages/ui/src/WayfindingPanel.tsx:28
Same override as findRoute, forwarded to the Drop Pin origin tab (issue #816).
Snap a [lng, lat] coordinate to the nearest walkable node id.
Parameters
pt
Position2D
Returns
Promise`<string | null>`
