Skip to content

Function: createBoostSelect()

ts
function createBoostSelect(config): Boost;

Parse a select share-URL query string into a structured Boost.

This helper is a URL-parameter PARSER, not a URL builder. The input is a raw select query-parameter value taken from a Mapsted share URL; the output is the typed Boost object that applyBoost expects.

To construct a share URL in the opposite direction, initialise the API with shareUrl on InitOptions so the iframe renders the native share widget with the current state encoded.

Parameters

ParameterTypeDescription
configstring— raw select query-parameter value from a share URL

Returns

Boost

a Boost that can be passed to applyBoost

Example

ts
// From a share URL such as https://.../map?select=42:7:building
const encoded = new URL(location.href).searchParams.get('select');
if (encoded) {
  await applyBoost(createBoostSelect(encoded));
}