spatial-monorepo / wayfinding/src / findMultiFloorGridRoute
Function: findMultiFloorGridRoute()
findMultiFloorGridRoute(
archive,origin,destination,opts?):MultiFloorRouteResult
Defined in: packages/wayfinding/src/grid-multifloor.ts:567
Finds a route between two points that may be on different floors, choosing which portal (staircase/elevator/escalator/ramp) to use at each floor transition by actual routed distance rather than centroid proximity (issue #482). Same-floor requests (origin.levelId === destination.levelId) skip the floor-connectivity machinery entirely and go straight to the single-floor ladder router.
Each Leg in the returned Route carries the correct levelId for the floor it was built on directly (no pathToLegs-style off-by-one derivation — this also resolves issue #426's leg-labelling defect for this engine, per issue #482 AC3).
