# Settings

Everything the app remembers between visits.

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

## Signature

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

## Properties

### basemapId

```ts
readonly basemapId: string | null;
```

The id of the basemap the person chose, or `null` when they never have.
With `null` the basemap is the host's default for the theme shown (see
`BasemapCatalogue`), and it changes when the theme does. A chosen id is
kept across theme changes and reloads. Nothing writes an id until a
person picks a basemap, so a stored id, even the default's, is a choice.
A shared link's basemap is not stored here.

### language

```ts
readonly language: string | null;
```

The BCP 47 tag of the language the person chose (for example `"af"`), or
`null` to follow the browser's languages. A tag the host does not offer
is ignored when the language is resolved. It lives on the device and is
not part of a shared link.

### lastView

```ts
readonly lastView: ViewState | null;
```

The view the map had when it was last left, or `null` when there is none.

### projection

```ts
readonly projection: MapProjection;
```

The shape of the map: `"flat"` (the default) or `"globe"`.

### theme

```ts
readonly theme: ThemeChoice;
```

The theme the person chose.

### tourSeen

```ts
readonly tourSeen: number | null;
```

The version of the first-visit tour the person has answered (taken,
skipped, or made unnecessary by turning a layer on), or `null` for a new
visitor. A host that bumps its tour version offers the tour once more.

### units

```ts
readonly units: UnitSystem;
```

Whether distances are shown in metric or imperial units.

### zoomButtons

```ts
readonly zoomButtons: boolean | null;
```

Whether to show zoom buttons. `null` means "use the device default":
on for fine pointers, off for touch. An explicit `true` shows them on
every device and never hides them.

## See also

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

Source: [packages/core/src/ports/settings.ts:16](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/ports/settings.ts#L16)
