Skip to main content

UrlStateValue

The shareable parts of the app state. Every field is optional.

This is an interface exported by @mapcairn/core, checked against version 0.2.0.

Signature​

import type { UrlStateValue } from "@mapcairn/core";

interface UrlStateValue

Properties​

basemapId​

readonly basemapId?: string;

The id of the basemap shown.

layers​

readonly layers?: LayersUrlState;

Which data layers are on, and their controls.

shapes​

readonly shapes?: string;

Drawn shapes in the compact link encoding (encodeShapes). Untrusted until decoded. The app never writes it to the address bar: it is read from a link someone shared, and written only into the link that UrlState builds when the person chooses to share shapes.

view​

readonly view?: ViewState;

Where the map is.

See also​

Source: packages/core/src/ports/url.ts:21