Function honuaRoutingProvider

  • Experimental

    Wrap the existing Honua facade route solver (the esri-compat routeProvider callback shape) in the RoutingProvider contract.

    The compat solver only reports aggregate totals, so to preserve the contract's one-leg-per-waypoint-segment shape (matching OSRM/Valhalla), multi-waypoint routes are solved one consecutive segment at a time — waypoints.length - 1 solver calls — and stitched: leg geometry is concatenated (dropping the duplicated junction vertex) and totals are the sums of the segment totals. Routing through fixed, in-order via points is exactly the concatenation of its pairwise routes, so the result is unchanged for solvers that route stops in order.

    Parameters

    Returns RoutingProvider