# MountMapOptions

Everything `mountMap` takes. Every option is optional.

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

## Signature

```ts
import type { MountMapOptions } from "@mapcairn/sdk/browser";
 
interface MountMapOptions
```

## Properties

### about

```ts
readonly about?: MountAbout;
```

The About block in Help. None when left out. In releases after `0.2.0`, not in `0.2.0` or any earlier release.

### basemap

```ts
readonly basemap?: string;
```

The id of the basemap to start on. The default of the basemaps, for the theme, when left out.

### basemaps

```ts
readonly basemaps?: readonly BasemapDefinition[];
```

The basemaps offered. The SDK's built-in basemaps when left out.

### creditsLink

```ts
readonly creditsLink?: MountLink;
```

A link to the page's own About page, listed after the map credits. None when left out. In releases after `0.2.0`, not in `0.2.0` or any earlier release.

### engineNotice

```ts
readonly engineNotice?: MountEngineNotice;
```

The notice for a map that cannot run, with the choice of a button that sends the `noticeaction` event, which the page must listen for. None when left out. In releases after `0.2.0`, not in `0.2.0` or any earlier release.

### label

```ts
readonly label?: string;
```

The name of this map. Give each of several maps on a page its own.

### language

```ts
readonly language?: string;
```

The tag of the language to start on, from `languages` or `"en-GB"`. The browser's choice when left out.

### languages

```ts
readonly languages?: readonly MountLanguage[];
```

Languages to offer besides English. The language switcher is in Settings.

### layers

```ts
readonly layers?: readonly LayerDefinition[] | (() => Promise<readonly LayerDefinition[]>);
```

The layers a person can turn on, as plain definitions or a function that
loads them. The layers are listed in the Map options sheet, so name
`"map-options"` in `tools`; without it they are not shown. Every layer
starts off. A list is checked when the map is mounted, even when
`"map-options"` is not named, and throws if it is not valid or if a layer
in it needs `services.layerSource` (a feed, a query or a heatmap layer, or
a tile layer with an `identify` block) and none was given. A tile or vector
layer without an `identify` block never needs one. A function that fails, a
layer it returns that is not valid and one that needs
`services.layerSource` when there is none are reported through the `error`
event, and the rest are kept.

### mainLandmark

```ts
readonly mainLandmark?: boolean;
```

Whether the map is wrapped in the page's `main` landmark. False when left
out, because a page has one `main` landmark and usually has its own. In
releases after `0.2.0`, not in `0.2.0` or any earlier release.

### notes

```ts
readonly notes?: MountNotes;
```

Notes in the page's words, for what the map does not know. See `MountNotes`. In releases after `0.2.0`, not in `0.2.0` or any earlier release.

### privacyHref

```ts
readonly privacyHref?: string;
```

Where the privacy policy is, shown as a link under Privacy in Settings: a
path on the page's site (`/privacy`) or an `http` or `https` address. Any
other address (`javascript:`, `data:`, `//other.example`) is a
`MountMapError` naming this option. No link when left out or empty. In releases after `0.2.0`, not in `0.2.0` or any earlier release.

### regionId

```ts
readonly regionId?: string;
```

The id of the map region, so a skip link the page drew before the map
existed can point at it. Text without spaces. The region has no id when
left out. The ids that link parts inside the map to each other are the
map's own and are not affected. An id is unique in a page, so two maps, or
a map and the page, must not share one, and an empty text is an error. In
releases after `0.2.0`, not in `0.2.0` or any earlier release.

### services

```ts
readonly services?: MountServices;
```

The providers the page writes.

### theme

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

`"system"` (when left out) follows the device.

### tools

```ts
readonly tools?: readonly MapTool[];
```

The tools to add. None when left out: zoom, the compass, the credits and the scale are always there.

### tour

```ts
readonly tour?: MountTour;
```

The first-visit tour. None when left out: the map then has no tour, and Help offers none. See `MountTour`. In releases after `0.2.0`, not in `0.2.0` or any earlier release.

### view

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

The starting view. A view of the whole world when left out.

## See also

- [`MountAbout`](https://docs.mapcairn.com/api/sdk/browser/MountAbout.md)
- [`BasemapDefinition`](https://docs.mapcairn.com/api/sdk/browser/BasemapDefinition.md)
- [`MountLink`](https://docs.mapcairn.com/api/sdk/browser/MountLink.md)
- [`MountEngineNotice`](https://docs.mapcairn.com/api/sdk/browser/MountEngineNotice.md)
- [`MountLanguage`](https://docs.mapcairn.com/api/sdk/browser/MountLanguage.md)
- [`LayerDefinition`](https://docs.mapcairn.com/api/sdk/browser/LayerDefinition.md)
- [`MountNotes`](https://docs.mapcairn.com/api/sdk/browser/MountNotes.md)
- [`MountServices`](https://docs.mapcairn.com/api/sdk/browser/MountServices.md)
- [`ThemeChoice`](https://docs.mapcairn.com/api/sdk/browser/ThemeChoice.md)
- [`MapTool`](https://docs.mapcairn.com/api/sdk/browser/MapTool.md)
- [`MountTour`](https://docs.mapcairn.com/api/sdk/browser/MountTour.md)
- [`ViewState`](https://docs.mapcairn.com/api/sdk/browser/ViewState.md)

Source: [packages/sdk/src/browser/types.ts:68](https://github.com/MapCairn/mapcairn/blob/main/packages/sdk/src/browser/types.ts#L68)
