# BasemapCatalogue

The basemaps a host offers, with the one used when nothing, or nothing
known, has been chosen. Plain data: a host builds one with
[`createBasemapCatalogue`](https://docs.mapcairn.com/api/core/createBasemapCatalogue.md) and passes it as `Services.basemaps`.

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

## Signature

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

## Properties

### basemaps

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

Every basemap, in the order the picker shows them.

### defaultId

```ts
readonly defaultId: string;
```

The id of the default basemap, which is in `basemaps`.

### themeDefaultIds

```ts
readonly themeDefaultIds?: ThemeDefaultIds;
```

The ids of the basemaps shown by default in each theme, all in
`basemaps`. Absent, or a theme left out, means `defaultId`. Read it with
[`defaultBasemapFor`](https://docs.mapcairn.com/api/core/defaultBasemapFor.md).

## Methods

### get

```ts
get(id: string): BasemapDefinition | undefined;
```

Finds a basemap by id.

- `id` (`string`)

### resolve

```ts
resolve(id: string): BasemapDefinition;
```

Turns a stored or linked id into a basemap. An id that names none (a
removed one, or the retired "auto" choice) gives `defaultId`'s basemap;
use [`resolveBasemapFor`](https://docs.mapcairn.com/api/core/resolveBasemapFor.md) to give the theme's default instead.

- `id` (`string`)

## See also

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

Source: [packages/core/src/basemaps/basemaps.ts:215](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/basemaps/basemaps.ts#L215)
