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 and passes it as Services.basemaps.
This is an interface exported by @mapcairn/core, checked against version 0.2.0.
Signature
import type { BasemapCatalogue } from "@mapcairn/core";
interface BasemapCatalogue
Properties
basemaps
readonly basemaps: readonly BasemapDefinition[];
Every basemap, in the order the picker shows them.
defaultId
readonly defaultId: string;
The id of the default basemap, which is in basemaps.
themeDefaultIds
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.
Methods
get
get(id: string): BasemapDefinition | undefined;
Finds a basemap by id.
id(string)
resolve
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 to give the theme's default instead.
id(string)