# 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

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

## Properties

### basemapId

```ts
readonly basemapId?: string;
```

The id of the basemap shown.

### layers

```ts
readonly layers?: LayersUrlState;
```

Which data layers are on, and their controls.

### shapes

```ts
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`](https://docs.mapcairn.com/api/core/UrlState.md) builds when the person chooses to share shapes.

### view

```ts
readonly view?: ViewState;
```

Where the map is.

## See also

- [`LayersUrlState`](https://docs.mapcairn.com/api/core/LayersUrlState.md)
- [`ViewState`](https://docs.mapcairn.com/api/core/ViewState.md)

Source: [packages/core/src/ports/url.ts:21](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/ports/url.ts#L21)
