Types

This page contains all types that can be provided as arguments to Map SDK functions. All types used throughout Map SDK functions link to this page, and any types that employ other types are referenced via clickable links.

CategoryType
Analytics Types
AnalyticsHandlers
NoPayloadEvent
RasterTileLoadEvent
UserEvent
UserEventType
Annotation Types
Annotation
Dataset Types
AddDatasetOptions
BaseDataset
BaseDatasetCreationProps
BaseField
BasicField
BasicFieldType
Field
Dataset
DatasetCreationProps
DatasetUpdateProps
LocalDataset
LocalDatasetCreationProps
RasterTileCreationMetadata
RasterTileDataset
RasterTileDatasetCreationProps
RasterTileDatasetRemoteCreationProps
RasterTileLocalMetadata
RasterTileMetadata
RasterTileRemoteMetadata
ReplaceDatasetOptions
RGBColor
TileDatasetCreationProps
TimestampField
VectorTileBaseMetadata
VectorTileCreationMetadata
VectorTileDataset
VectorTileDatasetCreationProps
VectorTileDatasetRemoteCreationProps
VectorTileLocalMetadata
VectorTileMetadata
VectorTileRemoteMetadata
Filter Types
BaseFilter
Filter
FilterCreationProps
FilterEventHandlers
FilterSource
FilterTimeline
FilterTimelineUpdateProps
FilterType
FilterUpdateprops
FilterView
MultiSelectFilter
PartialFilterSource
RangeFilter
SelectFilter
TimeRangeFilter
Layer Types
Layer
LayerConfig
LayerCreationProps
LayerEventHandlers
LayerGroup
LayerTimeline
LayerTimelineUpdateProps
LayerType
LayerUpdateProps
VisualChannel
VisualChannels
Map Types
Bound
EffectType
GeometrySelectionEvent
HTMLMap
MapControlVisibility
MapControls
MapCreationProps
MapEventHandlers
MapStyle
MapStyleCreationProps
MapStyleLayerGroup
MapStyleLayerGroupCreationProps
MouseEvent
OnClickHandlerType
OnGeometrySelectionHandlerType
OnHoverHandlerType
OnViewUpdateType
PickInfo
RequestParameters
SetMapConfigOptions
SetSplitModeOptions
SetViewLimitsOptions
SplitMode
SplitModeContext
SplitModeDetails
SplitModeProps
StudioLoadingProps
SyncWidgetMap
ThemeOptions
ThemePresets
ThemeUpdateProps
View
ViewLimits

Analytics Types

AnalyticsEventHandlers

Called whenever a user-triggered event happens.

Note: This is a on-prem feature and is not available for other versions of the Map SDK.

type AnalyticsEventHandlers = {
  onUserEvent?: (event: UserEvent) => void
};

NoPayloadEvents

export type NoPayloadEvent =
  | RemoveDatasetEvent
  | AddLayerEvent
  | RemoveLayerEvent
  | AddLayerGroupEvent
  | RemoveLayerGroupEvent;

RasterTileLoadEvent

A type returning raster tile loading status updates.

  assetUrls: string[];
  tileIndex: [number, number, number];
  remainingTiles: number;
  status: 'loading' | 'loaded' | 'canceled';
  error?: Error;
ArgumentTypeDescription
assetUrlsstring[]An array of URLs that the tile assets are being requested from.
tileIndex[number, number, number]An array containing tile coordinates [x, y, z].
remainingTilesnumberTotal number of tiles that are being loaded.
statusstringThe status of the raster tile loading. Either 'loading', 'loaded', 'canceled', or 'failed'.
errorErrorIf an error occurred, an error object describing the loading error.

UserEvent

A collection of types of events that are reported by onUserEvent callback.

type UserEvent = NoPayloadEvent | MapControlClickedEvent | SidePanelSectionChangedEvent;

Parameters

MapControlClickedEvent can return a payload with the control modified.

type MapControlClickedEvent = EventWithPayload<
  'activate-map-control',
  | {control: 'legend' | 'chart'}
  | {control: 'toggle-3d', mode: ViewMode}
  | {control: 'split-map', mode: SplitMode}
  | {control: 'map-draw', mode: DrawMode}
>;

SidePanelSectionChangedEvent can return the side panel changed.

type SidePanelSectionChangedEvent = EventWithPayload<
  'change-side-panel-section',
  {panel: SidePanelType}
>;

UserEventType

A collection of types of events that are reported by onUserEvent callback.

type UserEventType =
  | 'remove-dataset'
  | 'add-layer'
  | 'remove-layer'
  | 'add-layer-group'
  | 'remove-layer-group'
  | 'activate-map-control'
  | 'change-side-panel-section';
ArgumentTypeDescription
'remove-dataset'stringReported when a user removed a dataset.
'add-layer'stringReported when a user adds a layer.
'remove-layer'stringReported when a user removes a layer.
'add-layer-group'stringReported when a user adds a layer group.
'activate-map-control'stringReported when a user activates the map's controls.
'change-side-panel-section'stringReported when a user changes side panel sections.

Annotation Types

Annotation

A callout on the map, including a text label and an optional pointer to a location. See examples in Studio product documentation.

Annotation = {
  id: string;
  kind: 'POINT' | 'CIRCLE' | 'ARROW' | 'TEXT';
  isVisible: boolean;
  autoSize?: boolean;
  autoSizeY?: boolean;
  anchorPoint: AnchorPoint;
  label: string;
  editorState?: EditorState;
  mapIndex?: number;
  lineColor: string;
  lineWidth: number;
  textWidth: number;
  textHeight: number;
  textVerticalAlign?: 'top' | 'middle' | 'bottom';
  armLength?: number;
  angle?: number;
  radiusInMeters?: number;
};
class Annotation():
    id: StrictStr
    kind: Literal["TEXT", "ARROW", "POINT", "CIRCLE"]
    is_visible: StrictBool
    auto_size: Optional[StrictBool]
    auto_size_y: Optional[StrictBool]
    anchor_point: Tuple[float, float]
    label: StrictStr
    editor_state: Optional[Any]
    map_index: Optional[int]
    line_color: StrictStr
    line_width: float
    text_width: float
    text_height: float
    text_vertical_align: Literal["top", "middle", "bottom"]
    arm_length: Optional[float]
    angle: Optional[float]
    radius_in_meters: Optional[float]
Javascript
Arguments
ArgumentTypeDescription
idstringThe unique identifier of the annotation.
kind'POINT' | 'CIRCLE' | 'ARROW' | 'TEXT'The type of annotation.
isVisiblebooleanWhether the annotation should be visible on the map.
autoSizeboolean | undefinedWhether the annotation should be auto-sized horizontally to fit the text.
autoSizeYboolean | undefinedWhether the annotation should be auto-sized vertically to fit the text.
anchorPointAnchorPoint ([lon, lat])The anchor point of the annotation in [lon, lat] format.
labelstringThe textual description of the annotation.
editorStateEditorStateThe state of the editor. See more information for EditorState
mapIndexnumber | undefinedThe index of the map this annotation is attached to.
lineColorstringThe color of the annotation line.
lineWidthnumberThe width of the annotation line.
textWidthnumberThe width of the annotation text.
textHeightnumberThe height of the annotation text.
textVerticalAlign'top' | 'middle' | 'bottom' | undefinedThe vertical alignment of the annotation text.
armLengthnumberThe length of the annotation arm in pixels.
anglenumberThe angle of the annotation in degrees.
radiusInMetersnumberThe radius in meters (only for kind 'CIRCLE').
Python
Arguments
ArgumentTypeDescription
idStrictStrThe unique identifier of the annotation.
kindLiteral["TEXT", "ARROW", "POINT", "CIRCLE"]The type of annotation.
is_visibleStrictBoolWhether the annotation should be visible on the map.
auto_sizeOptional[StrictBool]Whether the annotation should be auto-sized horizontally to fit the text.
auto_size_yOptional[StrictBool]Whether the annotation should be auto-sized vertically to fit the text.
anchor_pointTuple[float, float]The anchor point of the annotation.
labelStrictStrThe textual description of the annotation.
editor_stateOptional[Any]See more information for EditorState
map_indexOptional[int]The index of the map this annotation is attached to.
line_colorStrictStrThe color of the annotation line.
line_widthfloatThe width of the annotation line.
text_widthfloatThe width of the annotation text.
text_heightfloatThe height of the annotation text.
text_vertical_alignLiteral["top", "middle", "bottom"]The vertical alignment of the annotation text.
arm_lengthOptional[float]The length of the annotation arm in pixels.
angleOptional[float]The angle of the annotation in degrees.
radius_in_metersOptional[float]The radius in meters (only for kind 'CIRCLE').

EditorState

Serialized content of Lexical editor (https://lexical.dev/). This object is used for formatting text within map annotations. It supports various customization options such as bold, italic, underline, color, and background color.

To see an example of the EditorState object working to format text, see our example here.

Arguments
ParameterTypeDescription
rootobjectRoot element containing the entire structure.
root.children[]arrayArray of child elements (e.g., paragraphs, text, links).
root.children[].typestringSpecifies element type (text, paragraph, link, linebreak).
root.children[].versionnumberIndicates element version (always 1).
root.children[].detailnumberAdditional detail for some text elements.
root.children[].formatnumberFormatting options (bold, italic, underline).
root.children[].modestringMode of the element (usually "normal").
root.children[].stylestringCustom styles like color and background-color.
root.children[].textstringText content of the element.
root.children[].directionstringText direction (usually left to right, or "ltr").
root.children[].indentnumberIndentation level (always 0).
root.children[].relstringLink relationship attribute (for link elements).
root.children[].targetstringTarget attribute for links (for link elements).
root.children[].urlstringURL for links (for link elements).
root.children[].children[]arrayNested array of child elements within a paragraph or other parent element.
root.children[].children[].typestringSpecifies element type within nested elements.
root.children[].children[].versionnumberIndicates element version within nested elements.
root.children[].children[].detailnumberAdditional detail for nested text elements.
root.children[].children[].formatnumberFormatting options for nested elements.
root.children[].children[].modestringMode of the element within nested elements.
root.children[].children[].stylestringCustom styles for nested elements.
root.children[].children[].textstringText content of nested elements.
root.children[].children[].directionstringText direction for nested elements (usually left to right, or "ltr"),
root.children[].children[].indentnumberIndentation level for nested elements (always 0).
root.children[].children[].relstringLink relationship attribute for nested link elements.
root.children[].children[].targetstringTarget attribute for nested link elements.
root.children[].children[].urlstringURL for nested link elements.
Example
export const editorContent = {
  root: {
    children: [
      {
        children: [
          {
            detail: 0,
            format: 0,
            mode: "normal",
            style: "",
            text: "This is ",
            type: "text",
            version: 1,
          },
          {
            detail: 0,
            format: 1,
            mode: "normal",
            style: "",
            text: "bold, ",
            type: "text",
            version: 1,
          },
          {
            detail: 0,
            format: 2,
            mode: "normal",
            style: "",
            text: "italic",
            type: "text",
            version: 1,
          },
          {
            detail: 0,
            format: 1,
            mode: "normal",
            style: "",
            text: ", ",
            type: "text",
            version: 1,
          },
          {
            detail: 0,
            format: 8,
            mode: "normal",
            style: "",
            text: "underline",
            type: "text",
            version: 1,
          },
          {
            detail: 0,
            format: 0,
            mode: "normal",
            style: "",
            text: ".",
            type: "text",
            version: 1,
          },
          {
            type: "linebreak",
            version: 1,
          },
          {
            children: [
              {
                detail: 0,
                format: 0,
                mode: "normal",
                style: "",
                text: "Link",
                type: "text",
                version: 1,
              },
            ],
            direction: "ltr",
            format: "",
            indent: 0,
            type: "link",
            version: 1,
            rel: "noopener noreferrer",
            target: "_blank",
            url: "https://studio.foursquare.com",
          },
          {
            detail: 0,
            format: 0,
            mode: "normal",
            style: "",
            text: ", ",
            type: "text",
            version: 1,
          },
          {
            detail: 0,
            format: 0,
            mode: "normal",
            style: "color: #C90000;",
            text: "red text",
            type: "text",
            version: 1,
          },
          {
            detail: 0,
            format: 0,
            mode: "normal",
            style: "",
            text: ", ",
            type: "text",
            version: 1,
          },
          {
            detail: 0,
            format: 0,
            mode: "normal",
            style: "background-color: #52A353;",
            text: "green bg",
            type: "text",
            version: 1,
          },
          {
            detail: 0,
            format: 0,
            mode: "normal",
            style: "",
            text: ".",
            type: "text",
            version: 1,
          },
        ],
        direction: "ltr",
        format: "",
        indent: 0,
        type: "paragraph",
        version: 1,
      },
      {
        children: [
          {
            detail: 0,
            format: 11,
            mode: "normal",
            style: "color: #C90000;background-color: #52A353;",
            text: "All styles",
            type: "text",
            version: 1,
          },
        ],
        direction: "ltr",
        format: "",
        indent: 0,
        type: "paragraph",
        version: 1,
      },
    ],
    direction: "ltr",
    format: "",
    indent: 0,
    type: "root",
    version: 1,
  },
};
editor_content = {
    "root": {
        "children": [
            {
                "children": [
                    {
                        "detail": 0,
                        "format": 0,
                        "mode": "normal",
                        "style": "",
                        "text": "This is ",
                        "type": "text",
                        "version": 1
                    },
                    {
                        "detail": 0,
                        "format": 1,
                        "mode": "normal",
                        "style": "",
                        "text": "bold, ",
                        "type": "text",
                        "version": 1
                    },
                    {
                        "detail": 0,
                        "format": 2,
                        "mode": "normal",
                        "style": "",
                        "text": "italic",
                        "type": "text",
                        "version": 1
                    },
                    {
                        "detail": 0,
                        "format": 1,
                        "mode": "normal",
                        "style": "",
                        "text": ", ",
                        "type": "text",
                        "version": 1
                    },
                    {
                        "detail": 0,
                        "format": 8,
                        "mode": "normal",
                        "style": "",
                        "text": "underline",
                        "type": "text",
                        "version": 1
                    },
                    {
                        "detail": 0,
                        "format": 0,
                        "mode": "normal",
                        "style": "",
                        "text": ".",
                        "type": "text",
                        "version": 1
                    },
                    {
                        "type": "linebreak",
                        "version": 1
                    },
                    {
                        "children": [
                            {
                                "detail": 0,
                                "format": 0,
                                "mode": "normal",
                                "style": "",
                                "text": "Link",
                                "type": "text",
                                "version": 1
                            }
                        ],
                        "direction": "ltr",
                        "format": "",
                        "indent": 0,
                        "type": "link",
                        "version": 1,
                        "rel": "noopener noreferrer",
                        "target": "_blank",
                        "url": "https://studio.foursquare.com"
                    },
                    {
                        "detail": 0,
                        "format": 0,
                        "mode": "normal",
                        "style": "",
                        "text": ", ",
                        "type": "text",
                        "version": 1
                    },
                    {
                        "detail": 0,
                        "format": 0,
                        "mode": "normal",
                        "style": "color: #C90000;",
                        "text": "red text",
                        "type": "text",
                        "version": 1
                    },
                    {
                        "detail": 0,
                        "format": 0,
                        "mode": "normal",
                        "style": "",
                        "text": ", ",
                        "type": "text",
                        "version": 1
                    },
                    {
                        "detail": 0,
                        "format": 0,
                        "mode": "normal",
                        "style": "background-color: #52A353;",
                        "text": "green bg",
                        "type": "text",
                        "version": 1
                    },
                    {
                        "detail": 0,
                        "format": 0,
                        "mode": "normal",
                        "style": "",
                        "text": ".",
                        "type": "text",
                        "version": 1
                    }
                ],
                "direction": "ltr",
                "format": "",
                "indent": 0,
                "type": "paragraph",
                "version": 1
            },
            {
                "children": [
                    {
                        "detail": 0,
                        "format": 11,
                        "mode": "normal",
                        "style": "color: #C90000;background-color: #52A353;",
                        "text": "All styles",
                        "type": "text",
                        "version": 1
                    }
                ],
                "direction": "ltr",
                "format": "",
                "indent": 0,
                "type": "paragraph",
                "version": 1
            }
        ],
        "direction": "ltr",
        "format": "",
        "indent": 0,
        "type": "root",
        "version": 1
    }
}


Dataset Types

AddDatasetOptions

Javascript-exclusive type.

Options applicable when adding a new dataset.

type AddDatasetOptions = {
  autoCreateLayers?: boolean,
  centerMap?: boolean
};
Arguments
ArgumentTypeDescription
autoCreateLayersbooleanWhether to attempt and create new layer(s) when adding a dataset. Defaults to true.
centerMapbooleanWhether to center the map to fit the new layer bounds. Defaults to true.

BaseDataset

Properties common to both tabular and tiled datasets.

type BaseDataset = {
  id: string,
  label: string,
  color: RGBColor,
  fields: Field[]
};
class BaseDataset():
  id: str
  type: string
  label: str
  color: RGBColor
  fields: List[Field]
Javascript
Arguments
ArgumentTypeDescription
idstringUnique identifier of the dataset.
labelstringUser-facing dataset label.
colorRGBColorColor label of the dataset.
fieldsField[]Schema describing the fields of the dataset.
Python
Arguments
ArgumentTypeDescription
idstringUnique identifier of the dataset.
typestringType of dataset. Can be "local", "vector-tile", or"raster-tile"
labelstringUser-facing dataset label.
colorRGBColorColor label of the dataset.
fieldsList[Field]Schema describing the fields of the dataset.

BaseDatasetCreationProps

Data used to create a dataset, in CSV, JSON, GeoJSON format.

type BaseDatasetCreationProps = Partial<Omit<BaseDataset, 'fields'>> & {
  data: string | object | unknown[][]
};
class DatasetCreationProps():
  id: Optional[str]
  label: Optional[str]
  color: Optional[RGBColor]
  data: Union[str, dict, List[List[Any]]]
Javascript
ParentDescription
BaseDatasetProperties common to both tabular and tiled datasets.
Arguments
ArgumentTypeDescription
datastring | object | unknown[][]Data used to create a dataset, in CSV, JSON, GeoJSON format.
Python
Arguments
ArgumentTypeDescription
idstringUnique identifier for the dataset.
labelstringDisplayable dataset label.
colorRGBColorColor label of the dataset.
dataUnion[str, dict, List[List[Any]]]Data used to create a dataset, in CSV, JSON, GeoJSON format.

BaseField

The field's unique identifier and user-facing label.

type BaseField = {
  name: string,
  label: string
};
class BaseField():
    name: str
    label: str
    type: FieldType
Javascript
Arguments
ArgumentTypeDescription
namestringA unique identifier for the field.
labelstringA user-facing field label.
Python
Arguments
ArgumentTypeDescription
namestringA unique identifier for the field.
labelstringA user-facing field label.

BasicField

Contains semantics around a single field in a dataset table.

type BasicField = BaseField & {
  type:
    | 'boolean'
    | 'date'
    | 'geojson'
    | 'integer'
    | 'real'
    | 'string'
    | 'array'
    | 'object'
    | 'point'
    | 'h3'
};
class BasicField(BaseField):
  type: BasicFieldType
ParentDescription
BaseFieldThe field's unique identifier and user-facing label.
Javascript
Arguments
ArgumentTypeDescription
typestringType of the field.
Python
Arguments
ArgumentTypeDescription
typeBasicFieldTypeType of the field.

BasicFieldType

Python exclsuive type.

Available field types.

class BasicFieldType(FieldType):
  BOOLEAN = "boolean"
  DATE = "date"
  GEOJSON = "geojson"
  INTEGER = "integer"
  REAL = "real"
  STRING = "string"
  ARRAY = "array"
  OBJECT = "object"
  POINT = "point"
  H3 = "h3"

Dataset

Dataset record.

type Dataset = LocalDataset | VectorTileDataset | RasterTileDataset;
Dataset = Union[LocalDataset, VectorTileDataset, RasterTileDataset]
MemberDescription
LocalDatasetDataset record representing a local dataset, with data provided by the caller.
VectorTileDatasetDataset record representing a vector tileset.
RasterTileDatasetRaster tileset metadata.

DatasetCreationProps

A set of properties used to synchronously add a dataset to the map.

type DatasetCreationProps =
  | LocalDatasetCreationProps
  | VectorTileDatasetCreationProps
  | RasterTileDatasetCreationProps;
class DatasetCreationProps() = Union[
    LocalDatasetCreationProps,
    VectorTileDatasetCreationProps,
    RasterTileDatasetCreationProps
  ]
MemberDescription
LocalDatasetCreationPropsDataset record representing a local dataset, with data provided by the caller.
VectorTileDatasetCreationPropsDataset record representing a vector tileset.
RasterTileDatasetCreationPropsRaster tileset metadata.

DatasetType

Python-exclusive type

Types of currently support datasets.

class DatasetType(str, Enum):
    LOCAL = "local"
    VECTOR_TILE = "vector-tile"
    RASTER_TILE = "raster-tile

DatasetUpdateProps

A set of properties used to update a dataset.

type DatasetUpdateProps = Partial<Pick<Dataset, 'label' | 'color'>>;
class _DatasetUpdateProps():
  label: Optional[str]
  color: Optional[RGBColor]
  fields: Optional[List[Field]]
Python
Arguments
ArgumentTypeDescription
labelstringDisplayable dataset label.
colorRGBColorColor label of the dataset.
fieldsOptional[List[Field]]Schema describing the fields of the dataset.

DatasetWithData

Type encapsulating a dataset record along with its data.

type DatasetWithData = Dataset & {
  data: unknown[][]
};
class DatasetWithData(LocalDataset):
  data: List[List[Any]]
Javascript
ParentDescription
DatasetDataset record.
Arguments
ArgumentTypeDescription
DatasetDatasetType encapsulating dataset properties.
dataunknown[][]Tabular data backing the dataset, where the order of fields matches the order in Dataset.fields
Python
ParentDescription
DatasetDataset record representing a local dataset, with data provided by the caller.
Arguments
ArgumentTypeDescription
dataList[List[any]]Tabular data backing the dataset, where the order of fields matches the order in Dataset.fields

DrawMode

Supported map draw modes.

type DrawMode = 'select' | 'polygon' | 'rectangle';

Field

A unison of available field types.

type Field = BasicField | TimestampField;
Field = Union[BasicField, TimestampField]
MemberDescription
BasicFieldContains semantics around a single field in a dataset table.
TimestampFieldContains semantics around a single timestamp field in a dataset table.

LocalDataset

Dataset record representing a local dataset, with data provided by the caller.

type LocalDataset = BaseDataset & {
  type: 'local'
};
class LocalDataset(BaseDataset):
    type = DatasetType.LOCAL;
ParentDescription
BaseDatasetProperties common to both tabular and tiled datasets.
Arguments
ArgumentTypeDescription
typestringMust be "local".

LocalDatasetCreationProps

Dataset record representing a local dataset, with data provided by the caller.

LocalDatasetCreationProps = BaseDatasetCreationProps & {
  type?: 'local';
  data: string | object | unknown[][];
};
ParentDescription
BaseDatasetCreationPropsData used to create a dataset, in CSV, JSON, GeoJSON format.
Arguments
ArgumentTypeDescription
BaseDatasetCreationPropsBaseDatasetCreationPropsData used to create a dataset, in CSV, JSON, GeoJSON format.
typestringMust be "local".
datastring, object, unknown[][]Data used to create a dataset, in CSV, JSON, GeoJSON format.

RasterTileCreationMetadata

Raster tileset metadata in STAC Item format. STAC version must be >= 1.0.0, and the EO and Raster STAC extensions are required. This metadata shape can be passed to the map to synchronously add a raster tileset.

type RasterTileCreationMetadata = {
  metadataUrl?: string,
  type: 'Feature',
  stac_version: string,
  extensions: string[],
  assets: Record<string, any>
};
Arguments
ArgumentTypeDescription
metadataUrlstringURL for tileset metadata.
typestringType of the raster tileset.
stac_versionstringSTAC version for tileset.
extensionsstring[]An array of extensions the Item implements.
assetsRecord<string, any>;Dictionary of asset objects that can be downloaded, each with a unique key.

RasterTileDataset

Raster tileset metadata.

type RasterTileDataset = BaseDataset & {
  type: 'raster-tile',
  metadata: RasterTileMetadata
};
class RasterTileDataset(BaseDataset):
  type = DatasetType.RASTER_TILE
  metadata: RasterTileMetadata
ParentDescription
BaseDatasetProperties common to both tabular and tiled datasets.

Javascript

Arguments
ArgumentTypeDescription
typestringMust be "raster-tile".
metadataRasterTileMetadataRaster tileset metadata.

Python

Arguments
ArgumentTypeDescription
typestringMust be "raster-tile".
metadataRasterTileMetadataRaster tileset metadata.

RasterTileDatasetCreationProps

Dataset record representing a raster tileset.

type RasterTileDatasetCreationProps = BaseDatasetCreationProps & {
  type: 'raster-tile',
  metadata: RasterTileCreationMetadata
};
ParentDescription
BaseDatasetCreationPropsData used to create a dataset, in CSV, JSON, GeoJSON format.
Arguments
ArgumentTypeDescription
typestringMust be "raster-tile".
metadataRasterTileCreationMetadataRaster tileset metadata in STAC Item format.

RasterTileDatasetRemoteCreationProps

Dataset record representing a raster tileset.

type RasterTileDatasetRemoteCreationProps = BaseDatasetCreationProps & {
  type: 'raster-tile',
  metadata: RasterTileRemoteMetadata
};
ParentDescription
BaseDatasetCreationPropsData used to create a dataset, in CSV, JSON, GeoJSON format.
Arguments
ArgumentTypeDescription
typestringMust be "raster-tile".
metadataRasterTileMetadataThe metadata of the raster tile.

RasterTileLocalMetadata

Python-exclusive type

Raster tileset metadata in STAC Item format. STAC version must be >= 1.0.0, and the EO and Raster STAC extensions are required. This metadata shape can be passed to the map to synchronously add a raster tileset.

class RasterTileLocalMetadata(RasterTileBaseMetadata):
    metadata_url: Optional[string]
    type: str = "Feature"
    stac_version: str = PydanticField(..., alias="stac_version")
    stac_extensions: List[str] = PydanticField(..., alias="stac_extensions")
    assets: Dict[str, Any]
ParentDescription
RasterTileBaseMetadataRaster tileset metadata.
Arguments
ArgumentTypeDescription
metadata_urlstringURL for tileset metadata.
typestringType of the raster tileset.
stac_versionstringSTAC version for tilesets.
stac_extensionsList[str]A list of extensions the Item implements.
assetsDict[str, Any]Dictionary of asset objects that can be downloaded, each with a unique key.

RasterTileMetadata

Raster tileset metadata.

type RasterTileMetadata = RasterTileCreationMetadata | RasterTileRemoteMetadata;
RasterTileMetadata = Union[RasterTileLocalMetadata, RasterTileRemoteMetadata]
Javascript
MemberDescription
RasterTileCreationMetadataRaster tileset metadata in STAC Item format. STAC version must be >= 1.0.0, and the EO and Raster STAC extensions are required. This metadata shape can be passed to the map to synchronously add a raster tileset.
RasterTileRemoteMetadataRaster tileset metadata with a remote metadata URL. This metadata can be passed to the map to asynchronously load a raster tileset.
Python
MemberDescription
RasterTileLocalMetadataRaster tileset metadata in STAC Item format. STAC version must be >= 1.0.0, and the EO and Raster STAC extensions are required. This metadata shape can be passed to the map to synchronously add a raster tileset.
RasterTileRemoteMetadataRaster tileset metadata with a remote metadata URL. This metadata can be passed to the map to asynchronously load a raster tileset.

RasterTileRemoteMetadata

Raster tileset metadata with a remote metadata URL. This metadata can be passed to the map to asynchronously load a raster tileset.

type RasterTileRemoteMetadata = {
  metadataUrl: string
};
class RasterTileRemoteMetadata(RasterTileBaseMetadata):
  metadata_url: string

Javascript

Arguments
ArgumentTypeDescription
metadataUrlstringThe metadata of the raster tile.

Python

Arguments
ArgumentTypeDescription
metadata_urlstringThe metadata of the raster tile.

DatasetCreationProps

Dataset record representing a local dataset, with data provided by the caller.

LocalDatasetCreationProps = BaseDatasetCreationProps & {
  type?: 'local';
  data: string | object | unknown[][];
};
ParentDescription
BaseDatasetCreationPropsData used to create a dataset, in CSV, JSON, GeoJSON format.
Arguments
ArgumentTypeDescription
typestringMust be "local".
data`stringobjectunknown[][]`Data used to create a dataset, in CSV, JSON, GeoJSON format.

RGBColor

Red, green, and blue channels of a color in [0-255] range.

type RGBColor = [number, number, number];
RGBColor = Tuple[Number, Number, Number]

ReplaceDatasetOptions

Javascript-exclusive type.

Options applicable when adding a new dataset.

type ReplaceDatasetOptions = {
  force?: boolean,
  strict?: boolean
};
Arguments
ArgumentTypeDescription
forcebooleanWhether to force a dataset replace, even if the compatibility check fails. Default: false.
strictbooleanWhether to ensure strict equality of types for each field being replaced. Default: false.

TileDatasetCreationProps

A set of properties used to asynchronously add a dataset to the map based on remote files.

type TileDatasetCreationProps =
  | VectorTileDatasetRemoteCreationProps
  | RasterTileDatasetRemoteCreationProps;
MemberDescription
VectorTileDatasetRemoteCreationPropsA set of properties used to create a vector tile dataset with provided metadata.
RasterTileDatasetRemoteCreationPropsDataset record representing a raster tileset.

TimestampField

Contains semantics around a single timestamp field in a dataset table.

type TimestampField = BaseField & {
  type: 'timestamp',
  timeFormat: string
};
class TimestampField(BaseField):
  type: TimestampFieldType = TimestampFieldType.TIMESTAMP
  time_format: str
ParentDescription
BaseFieldThe fields's unique identifier and user-facing label.
Javascript
Arguments
ArgumentTypeDescription
timeformatstringmoment.js time format of the field's temporal data.
Python
Arguments
ArgumentTypeDescription
typeTimestampFieldType.TIMESTAMPTimestamp type identifier.
timeformatstringmoment.js time format of the field's temporal data.

VectorTileBaseMetadata

Vector tileset base metadata.

type VectorTileBaseMetadata = {
  dataUrl: string
};
class VectorTileBaseMetadata():
    data_url: string

Javascript

ParentDescription
VectorTileMetadataVector tileset metadata with a remote metadata URL.
Arguments
ArgumentTypeDescription
dataUrlstringURL template for tiles, with {x}/{y}/{z} placeholders

Python

Arguments
ArgumentTypeDescription
data_urlstringURL template for tiles, with {x}/{y}/{z} placeholders

VectorTileCreationMetadata

Vector tileset metadata, following the metadata format generated by Tippecanoe. This metadata shape can be passed to the map to synchronously add a vector tileset.

type VectorTileCreationMetadata = VectorTileBaseMetadata & {
  metadataUrl?: string,
  bounds?: string | number[],
  center?: string | number[],
  maxzoom?: number,
  minzoom?: number,
  json: string | VectorTileEmbeddedMetadata
};
ParentDescription
VectorTileBaseMetadataVector tileset base metadata.
Arguments
ArgumentTypeDescription
VectorTileBaseMetadataVectorTileBaseMetadataVector tileset base metadata.
metadataUrlstringURL for tileset metadata.
boundsstring, number[]Tileset bounds, as an array or comma-delimited string in format "w,s,e,n".
centerstring, number[]Tileset center, as an array or comma-delimited string in format "lng,lat".
maxzoomnumberMaximum zoom supported by the tileset.
minzoomnumberMinimum zoom supported by the tileset.
jsonstring or VectorTileEmbeddedMetadataMetadata for the tileset, as a JSON string or object.

VectorTileDataset

Dataset record representing a vector tileset.

type VectorTileDataset = BaseDataset & {
  type: 'vector-tile',
  metadata: VectorTileMetadata
};
class VectorTileDataset(BaseDataset):
    type = DatasetType.VECTOR_TILE
    metadata: VectorTileMetadata
ParentDescription
BaseDatasetProperties common to both tabular and tiled datasets.

Javascript

Arguments
ArgumentTypeDescription
typestringMust be vector-tile.
metadataVectorTileMetadataVector tileset metadata with a remote metadata URL.

Python

Arguments
ArgumentTypeDescription
typestringMust be vector-tile.
metadataVectorTileMetadataVector tileset metadata with a remote metadata URL.

VectorTileDatasetCreationProps

A set of properties used to create a vector tile dataset with provided metadata.

type VectorTileDatasetCreationProps = BaseDatasetCreationProps & {
  type: 'vector-tile',
  metadata: VectorTileCreationMetadata
};
ParentDescription
BaseDatasetCreationPropsData used to create a dataset, in CSV, JSON, GeoJSON format.
Arguments
ArgumentTypeDescription
typestringMust be vector-tile.
metadataVectorTileCreationMetadataVector tileset metadata, following the metadata format generated by Tippecanoe.

VectorTileDatasetRemoteCreationProps

A set of properties used to create a vector tile dataset with provided metadata.

type VectorTileDatasetRemoteCreationProps = BaseDatasetCreationProps & {
  type: 'vector-tile',
  metadata: VectorTileRemoteMetadata
};
ParentDescription
BaseDatasetCreationPropsData used to create a dataset, in CSV, JSON, GeoJSON format.
Arguments
ArgumentTypeDescription
typestringMust be vector-tile.
metadataVectorTileRemoteMetadataVector tileset metadata with a remote metadata URL.

VectorTileLocalMetadata

Python-exclusive type

Vector tileset metadata, following the metadata format generated by Tippecanoe. This metadata shape can be passed to the map to synchronously add a vector tileset. See https://github.com/mapbox/tippecanoe

class VectorTileLocalMetadata(VectorTileBaseMetadata):
  metadata_url: Optional[str]
  bounds: Optional[Union[str, List[Number]]]
  center: Optional[Union[str, List[Number]]]
  maxzoom: Optional[Number]
  minzoom: Optional[Number]
ParentDescription
VectorTileBaseMetadataVector tileset base metadata.
Arguments
ArgumentTypeDescription
metadata_urlstringURL for tileset metadata.
boundsUnion[str, List[Number]]Tileset bounds, as an array or comma-delimited string in format "w,s,e,n".
centerUnion[str, List[Number]]Tileset center, as an array or comma-delimited string in format "lng,lat".
maxZoomNumberMaximum zoom supported by the tileset.
minzoomNumberMinimum zoom supported by the tileset.

VectorTileMetadata

Vector tileset metadata.

type VectorTileMetadata = VectorTileCreationMetadata | VectorTileRemoteMetadata;
VectorTileMetadata = Union[VectorTileLocalMetadata, VectorTileRemoteMetadata]
Javascript
MemberDescription
VectorTileCreationMetadataVector tileset metadata, following the metadata format generated by Tippecanoe. This metadata shape can be passed to the map to synchronously add a vector tileset.
VectorTileRemoteMetadataVector tileset metadata.
Python
MemberDescription
VectorTileLocalMetadataVector tileset metadata, following the metadata format generated by Tippecanoe. This metadata shape can be passed to the map to synchronously add a vector tileset. See https://github.com/mapbox/tippecanoe
VectorTileRemoteMetadataVector tileset metadata.

VectorTileRemoteMetadata

Vector tileset metadata.

type VectorTileRemoteMetadata = VectorTileBaseMetadata & {
  metadataUrl: string
};
class VectorTileRemoteMetadata(VectorTileBaseMetadata):
    metadata_url: string
ParentDescription
VectorTileBaseMetadataVector tileset base metadata.

Javascript

Arguments
ArgumentTypeDescription
metadataUrlstringURL for tileset metadata.

Python

Arguments
ArgumentTypeDescription
metadata_urlstringURL for tileset metadata.

Filter Types

BaseFilter

Type encapsulating common filter properties.

type BaseFilter<Type extends FilterType, Value> = {
  id: string;
  type: Type;
  sources: FilterSource[];
  value: Value;
};
class BaseFilter():
  id: Optional[str]
  type: FilterType
  sources: List[FilterSource]
  value: Any
Javascript
Arguments
ArgumentTypeDescription
idstringUnique identifier of the filter.
typeFilterTypeType of the filter.
sourcesFilterSource[]Data source(s) to apply the filter to. Note that only TimeRangeFilter currently supports multiple sources. The first given source is used for all other filters.
valueValueValue to base the filters on.
Python
Arguments
ArgumentTypeDescription
idstringUnique identifier of the filter.
typeFilterTypeType of the filter.
sourcesList[FilterSource[]]Data source(s) to apply the filter to. Note that only TimeRangeFilter currently supports multiple sources. The first given source is used for all other filters.
valueAnyValue to base the filters on.

Filter

Union of available filter types.

type Filter = RangeFilter | SelectFilter | TimeRangeFilter | MultiSelectFilter;
Filter = Union[
  RangeFilter,
  SelectFilter,
  TimeRangeFilter,
  MultiSelectFilter,
]
MemberDescription
RangeFilterFilter type that filters a range of values.
SelectFilterFilter type that filters based on a boolean value.
TimeRangeFilterFilter type that filters data within a range of time.
MultiSelectFilterFilter type that filters based on multiple string values.

FilterCreationProps

A set of properties used to create a filter. If source dataId is not provided, the filter will be applied to the first dataset with a given field name.

type FilterCreationProps = Optional<
  Omit<Filter, 'sources'> & {sources: PartialFilterSource[]},
  'id'
>;`
FilterCreationProps = _PartialFilter
ParentDescription
FilterUnion of available filter types.

FilterEventHandlers

A set of event handlers that are called on appropriate filter events.

type FilterEventHandlers = {
  onFilterUpdate?: (filter: Filter) => void
};