Skip to content

spatial-monorepo


spatial-monorepo / wayfinding/src / astar

Function: astar()

astar(graph, originId, destinationId, opts?): AStarResult | null

Defined in: packages/wayfinding/src/astar.ts:90

A* shortest-path search on a WayfindingGraph. Heuristic: haversine distance to goal converted to seconds at walking speed.

Parameters

graph

WayfindingGraph

originId

string

destinationId

string

opts?

AStarOptions = {}

Returns

AStarResult | null

Released under commercial licensing.