Skip to content

spatial-monorepo


spatial-monorepo / core/src / updateRoute

Function: updateRoute()

updateRoute(map, route): void

Defined in: packages/core/src/layers/WayfindingLayer.ts:336

Update the currently-shown route's data in place (no source/layer recreation). Also keeps the floor-transition symbol layer in sync with whether route has any floorTransitions — issue #471: switching (e.g. via Navigation.setActivePathByIndex) from a route with no transitions to one that has them (or vice versa) must not silently drop/leak the transition arrows just because updateRoute (unlike showRoute) only ever setDatas existing sources.

Parameters

map

Map$1 | null | undefined

route

NavigationRoute

Returns

void

Released under commercial licensing.