Skip to content

Function: createBoostRouting()

ts
function createBoostRouting(config): Boost;

Parse a routing share-URL query string (or structured RoutingConfig) into a Boost.

Like createBoostSelect, this is a URL-parameter PARSER, not a URL builder. When the argument is a string, it is treated as the raw routing/routeOptions share-URL query value. When the argument is a RoutingConfig object, the helper serialises the object into the same query-string shape the share URL uses before delegating to createBoost.

Parameters

ParameterTypeDescription
configstring | RoutingConfig— raw share-URL query value, or a RoutingConfig object

Returns

Boost

a Boost that can be passed to applyBoost

Example

ts
// From a share URL such as https://.../map?routing=95:2936,95:71
const encoded = new URL(location.href).searchParams.get('routing');
if (encoded) {
  await applyBoost(createBoostRouting(encoded));
}

// From a structured config object
await applyBoost(createBoostRouting({
  routing: '95:2936,95:71',
  routeOptions: 'IncludeElevators,IncludeEscalators',
}));