Skip to content

Interface: Theme

A map theme — the visual palette applied to tiles + UI chrome.

Shape matches the Mapsted CMS themes schema.

Built-in themes (always available):

  • _id: "mapstedLight" — Carto Voyager raster basemap.
  • _id: "mapstedDark" — Carto Dark Matter raster basemap.

Properties may also ship CMS-owned themes (with property set); call getThemes() to retrieve the full list for the current property.

Indexable

ts
[key: string]: unknown

CMS metadata (createdAt, updatedAt, createdBy, etc.).

Properties

PropertyTypeDescription
_idstringUnique theme identifier.
activebooleanWhether the theme is active for the property.
darkbooleantrue for dark-polarity themes, false for light-polarity.
namestring | Record<string, string>Display name. May be a plain string or a locale map (Mongoose Mixed type).
primary?booleantrue if the CMS marks this as the primary theme for its polarity.
property?stringCMS property ObjectId string — absent on the two built-in themes.
tileLayer{ attributions: string; baseMapId: string; projection: string; url: string; }Tile-layer configuration.
tileLayer.attributionsstring-
tileLayer.baseMapIdstring-
tileLayer.projectionstring-
tileLayer.urlstring-