Types

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
UserEvent
UserEventType
Dataset Types
AddDatasetOptions
BaseDataset
BaseDatasetCreationProps
BaseField
BasicField
BasicFieldType
Field
Dataset
DatasetCreationProps
DatasetUpdateProps
LocalDataset
LocalDatasetCreationProps
RasterTileCreationMetadata
RasterTileDataset
RasterTileDatasetCreationProps
RasterTileDatasetRemoteCreationProps
RasterTileLocalMetadata
RasterTileMetadata
RasterTileRemoteMetadata
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
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 pro feature and is not available publicly.

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

NoPayloadEvents

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

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.

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]

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
};
class FilterEventHandlers():
    on_filter_update: Optional[Callable[[Filter], None]]

FilterSource

Source that the filter is applied to.

type FilterSource = {
  dataId: string,
  fieldName: string
};
class FilterSource():
  data_id: str
  field_name: str
Javascript
Arguments
ArgumentTypeDescription
dataIdstringIdentifier of the dataset that the filter applies to.
fieldNamestringField to filter by. The field identifier defaults to the field name and can be retrieved as part of the dataset record.
Python
Arguments
ArgumentTypeDescription
data_idstringIdentifier of the dataset that the filter applies to.
field_namestringField to filter by. The field identifier defaults to the field name and can be retrieved as part of the dataset record.

FilterTimeline

Time range filter properties that encapsulate timeline interaction.

type FilterTimeline = {
  view: 'side' | 'enlarged' | 'minified',
  timeFormat: string,
  timezone: string | null,
  isAnimating: boolean,
  animationSpeed: number,
  step: number
};
class FilterTimeline():
  view: FilterView
  time_format: str
  timezone: Optional[str]
  is_animating: bool
  animation_speed: Number
  step: Number
Javascript
Arguments
ArgumentTypeDescription
viewstringCurrent timeline presentation.
timeFormatstringTime format that the timeline is using in day.js supported format.
timezonestringTimezone that the timeline is using in tz format.
isAnimatingbooleanFlag indicating whether the timeline is animating or not.
animationSpeednumberSpeed at which timeline is animating.
stepnumberMinimum animation step size in milliseconds.
Python
Arguments
ArgumentTypeDescription
viewFilterViewCurrent timeline presentation.
time_formatstringTime format that the timeline is using in day.js supported format.
timezonestringTimezone that the timeline is using in tz format.
is_animatingbooleanFlag indicating whether the timeline is animating or not.
animation_speednumberSpeed at which timeline is animating.
stepnumberMinimum animation step size in milliseconds.

FilterTimelineUpdateProps

A set of properties that can be updated on a timeline.

type FilterTimelineUpdateProps = Partial<Omit<FilterTimeline, 'step'>>;
class FilterTimelineUpdateProps():
    view: Optional[FilterView]
    time_format: Optional[str]
    timezone: Optional[str]
    is_animating: Optional[bool]
    animation_speed: Optional[Number]
Javascript
ParentTypeDescription
FilterTimelineFilterTimelineA partial FilterTimeline object.
Python
Arguments
ArgumentTypeDescription
viewFilterViewCurrent timeline presentation.
time_formatstringTime format that the timeline is using in day.js supported format.
timezonestringTimezone that the timeline is using in tz format.
is_animatingbooleanFlag indicating whether the timeline is animating or not.
animation_speednumberSpeed at which timeline is animating.

FilterType

Types of currently supported filters.

type FilterType = 'range' | 'select' | 'time-range' | 'multi-select';
class FilterType(str, Enum):
    RANGE = "range"
    SELECT = "select"
    TIME_RANGE = "time-range"
    MULTI_SELECT = "multi-select"`

FilterUpdateProps

A set of properties used to update a filter.

type FilterUpdateProps = Partial<Pick<Filter, 'value'> & {sources: PartialFilterSource[]}>;
FilterUpdateProps = _PartialFilter
ParentDescription
FilterUnion of available filter types.

FilterView

Python-exclusive type.

A union of filter views.

Literal["side", "enlarged", "minified"]

MultiSelectFilter

Filter type that filters based on a multiple string value.

type MultiSelectFilter = BaseFilter<'multi-select', string[]>;
class MultiSelectFilter(BaseFilter):
    type = FilterType.MULTI_SELECT
    value: List[str]
ParentDescription
BaseFilterType encapsulating common filter properties.

PartialFilterSource

Partially defined filter source where the dataId can be left out.

type PartialFilterSource = Optional<FilterSource, 'dataId'>;
PartialFilter = Union[
  PartialRangeFilter,
  PartialSelectFilter,
  PartialTimeRangeFilter,
  PartialMultiSelectFilter,
]
ParentDescription
FilterSourceSource that the filter is applied to.

RangeFilter

Filter type that filters a range of values.

type RangeFilter = BaseFilter<'range', Range>;
class RangeFilter(BaseFilter):
    type = FilterType.RANGE
    value: Range

SelectFilter

Filter type that filters based on a boolean value.

type SelectFilter = BaseFilter<'select', boolean>;
class SelectFilter(BaseFilter):
    type = FilterType.SELECT
    value: bool
ParentDescription
BaseFilterType encapsulating common filter properties.

TimeRangeFilter

type TimeRangeFilter = BaseFilter<'time-range', TimeRange> & {
  domain: TimeRange,
  timeline: FilterTimeline
};
class TimeRangeFilter(BaseFilter):
    type = FilterType.TIME_RANGE
    value: TimeRange
    domain: TimeRange
    timeline: FilterTimeline
ParentDescription
BaseFilterType encapsulating common filter properties.
Javascript
Arguments
ArgumentTypeDescription
domaintimeRangeTime domain of the dataset this filter is being applied to.
timelineFilterTimelineTime range filter timeline information.
Python
Arguments
ArgumentTypeDescription
typeFilterType.TIME_RANGEThe time range filter type.
valuetimeRangeThe range of time this filter is being applied to.
domaintimeRangeTime domain of the dataset this filter is being applied to.
timelineFilterTimelineTime range filter timeline information.


Layer Types

Types of layers that the visualization is supported for.

Layer

Type encapsulating layer properties.

type Layer = {
  id: string,
  type: LayerType | null,
  dataId: string,
  fields: Record<string, string | null>,
  label: string,
  isVisible: boolean,
  config: LayerConfig
};
class Layer(LayerCreationProps):
  id: str
  type: Optional[LayerType]
  data_id: str
  fields: Dict[str, Optional[str]]
  label: str
  is_visible: bool
  config: LayerConfig
Javascript
Arguments
ArgumentTypeDescription
idstringUnique identifier of the layer.
typeLayerTypeType of the layer.
dataIdstringUnique identifier of the dataset this layer visualizes.
fieldsRecord<string, string>Dictionary that maps fields that the layer requires for visualization to appropriate dataset fields.
labelstringCanonic label of this layer.
isVisiblebooleanFlag indicating whether layer is visible or not.
configLayerConfigLayer configuration specific to its type.
Python
Arguments
ArgumentTypeDescription
idstringUnique identifier of the layer.
typeLayerTypeType of the layer.
data_idstringUnique identifier of the dataset this layer visualizes.
fieldsDict[str, Optional[str]]Dictionary that maps fields that the layer requires for visualization to appropriate dataset fields.
labelstringCanonic label of this layer.
is_visiblebooleanFlag indicating whether layer is visible or not.
configLayerConfigLayer configuration specific to its type.

LayerConfig

Internal layer configuration.

type LayerConfig = {
  visualChannels: VisualChannels,
  visConfig: Record<string, unknown>
};
class LayerConfig(PartialLayerConfig):
  visual_channels: VisualChannels
  vis_config: Dict[str, Any]
Javascript
Arguments
ArgumentTypeDescription
visualChannelsVisualChannelsDictionary of visualization properties that the layer supports.
visConfigRecord<string, unknown>;General layer settings.
Python
Arguments
ArgumentTypeDescription
visual_channelsVisualChannelsDictionary of visualization properties that the layer supports.
vis_configDict[str, Any]General layer settings.

LayerCreationProps

A set of properties used to create a layer.

type LayerCreationProps = Omit<
  Optional<Layer, 'id' | 'fields' | 'label' | 'isVisible'>,
  'config'
> & {
  config?: Partial<LayerConfig>
};
class LayerCreationProps(LayerUpdateProps):
  id: Optional[str]
  type: Optional[LayerType]
  data_id: Optional[str]
  fields: Dict[str, Optional[str]]
  label: Optional[str]
  is_visible: Optional[bool]
  config: Optional[PartialLayerConfig]
Python
Arguments
ArgumentTypeDescription
idstringUnique identifier of the layer.
typeLayerTypeType of the layer.
data_idstringUnique identifier of the dataset this layer visualizes.
fieldsDict[str, Optional[str]]Dictionary that maps fields that the layer requires for visualization to appropriate dataset fields.
labelstringCanonical label of this layer.
is_visibleboolFlag indicating whether layer is visible or not.
configPartialLayerConfigLayer configuration specific to its type.

LayerEventHandlers

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

type LayerEventHandlers = {
  onLayerTimelineUpdate?: (layerTimeline: LayerTimeline) => void
};
class LayerEventHandlers():
  on_layer_timeline_update: Callable[[LayerTimeline], None]

LayerTimeline

Type encapsulating layer timeline properties.

type LayerTimeline = {
  currentTime: number,
  domain: TimeRange,
  isAnimating: boolean,
  isVisible: boolean,
  animationSpeed: number,
  timeFormat: string,
  timezone: string | null,
  timeSteps: number[] | null
};
class LayerTimelineUpdateProps():
  current_time: Optional[Number]
  domain: TimeRange
  is_animating: Optional[bool]
  is_visible: Optional[bool]
  animation_speed: Optional[Number]
  time_format: Optional[str]
  timezone: Optional[str]
  time_steps: Optional[List[Number]]
Javascript
Arguments
ArgumentTypeDescription
currentTimenumberCurrent time on the timeline in milliseconds.
domaintimeRangeRange of time that the timeline shows.
isAnimatingbooleanFlag indicating whether the timeline is animating or not.
isVisiblebooleanFlag indicating whether the timeline is visible or not.
animationSpeednumberSpeed at which timeline is animating.
timeFormatstringTime format that the timeline is using in day.js supported format.
timezonestringTimezone that the timeline is using in tz format.
timeStepsnumber[]Step duration for all the animation keyframes in milliseconds.
Python
Arguments
ArgumentTypeDescription
current_timenumberCurrent time on the timeline in milliseconds.
domaintimeRangeRange of time that the timeline shows.
is_animatingbooleanFlag indicating whether the timeline is animating or not.
is_visiblebooleanFlag indicating whether the timeline is visible or not.
animation_speednumberSpeed at which timeline is animating.
time_formatstringTime format that the timeline is using in day.js supported format.
timezonestringTimezone that the timeline is using in tz format.
time_stepsList[Number]]Step duration for all the animation keyframes in milliseconds.

LayerGroup

A conceptual group used to organize layers.

type LayerGroup = {
  id: string,
  label: string,
  isVisible: boolean,
  layerIds: string[]
};
class LayerGroup:
    id: StrictStr
    label: StrictStr
    is_visible: StrictBool
    layers: List[StrictStr]
Javascript
Arguments
ArgumentTypeDescription
idstringUnique identifier of the layer group.
labelstringCanonical label of this group.
isVisiblebooleanFlag indicating whether layer group is visible or not.
layerIdsstring[]Layers that are part of this group, sorted in the order in which they are shown.
Python
Arguments
ArgumentTypeDescription
idstringUnique identifier of the layer group.
labelstringCanonical label of this group.
is_visiblebooleanFlag indicating whether layer group is visible or not.
layersList[string]Layers that are part of this group, sorted in the order in which they are shown.

LayerTimelineUpdateProps

type LayerTimelineUpdateProps = Partial<
  Pick<
    LayerTimeline,
    'currentTime' | 'isAnimating' | 'isVisible' | 'animationSpeed' | 'timeFormat' | 'timezone'
  >
>;
class LayerTimelineUpdateProps():
  current_time: Optional[Number]
  is_animating: Optional[bool]
  is_visible: Optional[bool]
  animation_speed: Optional[Number]
  time_format: Optional[str]
  timezone: Optional[str]
Python
Arguments
ArgumentTypeDescription
current_timenumberCurrent time on the timeline in milliseconds.
is_animatingbooleanFlag indicating whether the timeline is animating or not.
is_visiblebooleanFlag indicating whether the timeline is visible or not.
animation_speednumberSpeed at which timeline is animating.
time_formatstringTime format that the timeline is using in day.js supported format.
timezonestringTimezone that the timeline is using in tz format.

LayerType

type LayerType =
  | 'point'
  | 'arc'
  | 'line'
  | 'grid'
  | 'hexagon'
  | 'geojson'
  | 'cluster'
  | 'icon'
  | 'heatmap'
  | 'h3'
  | '3d'
  | 'trip'
  | 's2'
  | 'raster-tile'
  | 'vector-tile';
class LayerType(str, Enum):
  POINT = "point"
  ARC = "arc"
  LINE = "line"
  GRID = "grid"
  HEXAGON = "hexagon"
  GEOJSON = "geojson"
  CLUSTER = "cluster"
  ICON = "icon"
  HEATMAP = "heatmap"
  H3 = "h3"
  THREE_D = "3d"
  TRIP = "trip"
  S2 = "s2"
  RASTER_TILE = "raster-tile"
  VECTOR_TILE = "vector-tile"

LayerUpdateProps

A set of properties used to update a layer.

type LayerUpdateProps = Omit<PartialWithoutId<Layer>, 'config'> & {
  config?: Partial<LayerConfig>
};
class LayerUpdateProps():
  type: Optional[LayerType]
  data_id: str
  fields: Optional[Dict[str, Optional[str]]]
  label: Optional[str]
  is_visible: Optional[bool]
  config: Optional[PartialLayerConfig
Python
Arguments
ArgumentTypeDescription
typenumberType of the layer.
data_idstringUnique identifier of the dataset this layer visualizes.
fieldsDict[str, Optional[str]]Dictionary that maps fields that the layer requires for visualization to appropriate dataset fields.
labelstringCanonical label of this layer.
is_visibleboolFlag indicating whether layer is visible or not.
configPartialLayerConfigLayer configuration specific to its type.

PartialLayerConfig

Python-exclusive type.

class PartialLayerConfig():
    visual_channels: Optional[VisualChannels]
    vis_config: Optional[Dict[str, Any]]
Arguments
ArgumentTypeDescription
visual_channelsVisualChannelsDictionary of visualization properties that the layer supports.
vis_config[Dict[str, Any]]General layer settings.

TileDatasetCreationProps

A set of properties used to asynchronously add a dataset to the map based on remote vector or raster tileset 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.

VisualChannel

Python-exclusive type.

A dictionary of visualization properties that the layer supports.

class VisualChannel():
  name: str
  type: str

VisualChannels

A dictionary of visualization properties that the layer supports.

type VisualChannels = {
  [key: string]:
    | {
        name: string,
        type: string
      }
    | string
    | null
};
VisualChannels =
  Dict[str, Union[VisualChannel, str, None]]

Map Types

Bounds

Type representing map bounds.

type Bounds = {
  minLongitude: number,
  maxLongitude: number,
  minLatitude: number,
  maxLatitude: number
};
class Bounds():
  min_longitude: Number
  max_longitude: Number
  min_latitude: Number
  max_latitude: Number
Javascript
Arguments
ArgumentTypeDescription
minLongitudenumberMinimum (left) longitude value.
maxLongitudenumberMaximum (right) longitude value.
minLatitudenumberMinimum (bottom) latitude value.
maxLatitudenumberMaximum (top) latitude value.
Python
Arguments
ArgumentTypeDescription
min_longitudenumberMinimum (left) longitude value.
max_longitudenumberMaximum (right) longitude value.
min_latitudenumberMinimum (bottom) latitude value.
max_latitudenumberMaximum (top) latitude value.

GeometrySelectionEvent

Geometry selection event containing an array of GeoJSON polygon features.

type GeometrySelectionEvent = {
  features: Feature<Polygon>[]
};
class GeometrySelectionEvent():
  features: List[Feature[Polygon, Any]]

HTMLMap

Python exclsuive type.

class HTMLMap(
    self,
    style: Optional[Dict] = None,
    basemaps: Optional[Dict] = None,
)`
Arguments
ArgumentTypeDescription
styleDictOptional map container CSS style customization. Uses camelCase as this is React standard.
basemapsDictBasemap customization settings.
basemaps.custom_map_stylesList[MapStyleCreationProps]A set of properties required when specifying a map style.
basemaps.initial_map_stylesstringA mapbox style ID.

MapControlVisibility

A map of map control component visibility.

type MapControlVisibility = {
  [control in MapControls]: boolean;
};
class MapControlVisibility():
  legend: bool
  toggle_3d: bool
  split_map: bool
  map_draw: bool
Python
Arguments
ArgumentTypeDescription
legendboolWhether the legend is visible.
toggle_3dboolWhether the 3D toggle is visible.
split_mapboolWhether the split map button is visible.
map_drawboolWhether the map draw button is visible.

MapControls

Javascript-exclusive type.

Map controls that support customization.

type MapControls = 'legend' | 'toggle-3d' | 'split-map' | 'map-draw';

MapCreationProps

A set of properties used to initialize the map.

type MapCreationProps = {
  container?: HTMLElement,
  style?: CSSProperties,
  eventHandlers?: MapEventHandlers,
  showPlaceholder?: boolean,
  basemaps?: {
    customMapStyles?: MapStyleCreationProps[],
    initialMapStyleId?: string,
    mapboxAccessToken?: string,
    transformRequest?: (opts: {url: string}) => RequestParameters
  },
  raster?: {
    serverUrls?: string[],
    stacSearchUrl?: string
  },
  uiConfig?: {
    mapName?: string,
    sidePanel?: {
      view?: 'hidden' | 'collapsed' | 'visible',
      isAddLayerVisible?: boolean,
      addDataButton?: {
        onClick?: () => void
      }
    },
    sideNav?: {
      isVisible?: boolean
    }
  }
};
Arguments
ArgumentTypeDescription
containerHTMLElementDOM element to embed map into.
styleCSSPropertiesMap container CSS style customization.
eventHandlersMapEventHandlersEvent handlers to attach to the map.
showPlaceholderboolVisibility of loading screen placeholder. Default: true
basemapsobjectBasemap customization settings.
basemaps.customMapStylesMapStyleCreationProps[]Custom map styles to make available for usage.
basemaps.mapboxAccessTokenstringMapbox token to be used when loading the provided custom map styles.
basemaps.initialMapStyleIdstringIdentifier for the map style to be used initially.
transformRequestfunctionFunction to transform basemap resource requests.
rasterobject
Customization related to raster datasets and tiles.
raster.serverUrlsstring[]
URLs to custom servers to target when serving raster tiles.
raster.stacSearchUrlsstring
URL to pass to the backend for searching a STAC Collection.
uiConfigobject
UI configuration object.
uiConfig.mapNamestring
Name of the map to show in the title. Default = Studio
uiConfig.sidePanelobject
A UI component displaying options for data, layer, and map manipulation.
uiConfig.sidePanel.viewstring
View state of the side panel. Options include 'hidden','collapsed', or 'visible'.
uiConfig.sidePanel.isAddLayerVisiblebool
When enabled, display the "Add Layer" button.
uiConfig.sidePanel.addDataButtonobject
Custom settings for the Add Data button.
uiConfig.sidePanel.addDatabutton.onClick
Custom event handler for the Add Data button.
uiConfig.sideNavobject
A UI element containing company logo and relevant links.
uiConfig.sideNav.isVisiblebool
When enabled, display the sidenav sidePanel.
urls.staticAssetUrlBasestring
Custom URL base for static assets.
urls.applicationUrlBasestring
Custom URL base for workers and other script resources loaded by the SDK.

MapEventHandlers

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

type MapEventHandlers = {
  onClick?: (event: MouseEvent) => void,
  onHover?: (event: MouseEvent) => void,
  onViewUpdate?: (view: View) => void,
  onGeometrySelection?: (event: GeometrySelectionEvent) => void
} & LayerEventHandlers &
  FilterEventHandlers;
class MapEventHandlers():
  on_click: Optional[OnClickHandlerType]
  on_hover: Optional[OnHoverHandlerType]
  on_view_update: Optional[OnViewUpdateType]
  on_geometry_selection: Optional[OnGeometrySelectionType]
Javascript
Arguments
ArgumentTypeDescription
onClick(event: MouseEvent)Called whenever user clicks the visible part of the map.
onHover(event: MouseEvent)Called whenever a mouse hovers over a visible part of the map.
onViewUpdate(view: View)Called whenever visible map viewport changes.
onGeometrySelection(event: GeometrySelectionEvent)Called whenever a geometry is selected on the map.
AnalyticsEventHandlers(event: UserEvent)Called whenever a user-triggered event happens.
Python
Arguments
ArgumentTypeDescription
on_clickOnClickHandlerTypeCalled whenever user clicks the visible part of the map.
on_hoverOnHoverHandlerTypeCalled whenever a mouse hovers over a visible part of the map.
on_view_updateOnViewUpdateTypeCalled whenever visible map viewport changes.
on_geometry_selection_eventOnGeometrySelectionTypeCalled whenever a geometry is selected on the map.

MapStyle

Unique identifier of the MapStyle.

type MapStyle = {
  id: string,
  label: string,
  url: string,
  thumbnailUrl: string,
  layerGroups: MapStyleLayerGroup[]
};
class MapStyle():
  id: str
  label: str
  url: str
  thumbnail_url: str
  layer_groups: List[MapStyleLayerGroup]
Javascript
Arguments
ArgumentTypeDescription
idstringUnique identifier of the MapStyle.
labelstringUser facing MapStyle label.
urlstringURL of the MapStyle descriptor json in Mapbox style format.
thumbnailUrlstringURL of the thumbnail to show alongside the MapStyle.
layerGroupsMapStyleLayerGroup[]An array of MapStyle layer groups.
Python
Arguments
ArgumentTypeDescription
idstringUnique identifier of the MapStyle.
labelstringUser facing MapStyle label.
urlstringURL of the MapStyle descriptor json in Mapbox style format.
thumbnail_urlstringURL of the thumbnail to show alongside the MapStyle.
layer_groupsList[MapStyleLayerGroup]An array of MapStyle layer groups.

MapStyleCreationProps

A set of properties required when specifying a MapStyle.

type MapStyleCreationProps = Merge<
  Optional<MapStyle, 'id' | 'thumbnailUrl'>,
  {layerGroups?: MapStyleLayerGroupCreationProps[]}
>;
class MapStyleCreationProps():
  id: Optional[str]
  thumbnail_url: Optional[str]
  layer_groups: Optional[List[MapStyleLayerGroupCreationProps]]
Python
Arguments
ArgumentTypeDescription
idstringUnique identifier of the MapStyle.
thumbnail_urlstringUser facing MapStyle label.
thumbnail_groupsstringURL of the MapStyle descriptor json in Mapbox style format.

MapStyleLayerGroup

A grouping concept for MapStyle layers, allowing for interaction on a set of layers.

type MapStyleLayerGroup = {
  label: string,
  defaultVisibility: boolean
};
class MapStyleLayerGroup():
  label: str
  default_visibility: bool
Javascript
Arguments
ArgumentTypeDescription
labelstringLayer group text representation. Currently supported labels are: label, road, border, building, water, land, 3d building.
defaultVisibilitybooleanWhether this group should be visible by default.
Python
Arguments
ArgumentTypeDescription
labelstringLayer group text representation. Currently supported labels are: label, road, border, building, water, land, 3d building.
default_visibilitybooleanWhether this group should be visible by default.

MapStyleLayerGroupCreationProps

A set of properties required when specifying a MapStyle layer group.

type MapStyleLayerGroupCreationProps = MapStyleLayerGroup & {
  filter: string
};
class MapStyleLayerGroupCreationProps(MapStyleLayerGroup):
  filter: str
ParentDescription
MapStyleLayerGroupA grouping concept for MapStyle layers, allowing for interaction on a set of layers.
Arguments
ArgumentTypeDescription
filterstringLayer filtering regular expression that determines whether layer with a given id should be part of this group. Supports regular JS RegExp syntax.

MouseEvent

Mouse event capturing information such as position and any map features related to it.

type MouseEvent = {
  coordinate: [number, number],
  position: [number, number],
  pickInfo?: {
    layerId: string,
    rowIndex: number,
    rowData: unknown[]
  }
};
class MouseEvent():
  coordinate: Tuple[Number, Number]
  position: Tuple[Number, Number]
  pick_info: Optional[PickInfo]
Javascript
Arguments
ArgumentTypeDescription
coordinate[number, number]Geospatial coordinates [longitude, latitude].
position[number, number]Mouse position relative to the viewport [x, y].
pickInfoobjectAdditional context on map data associated with this event.
pickInfo.layerIdstringIdentifier of the layer that the mouse event is related to.
pickInfo.rowIndexnumberIndex of the row in the data table that picked layer visualizes.
pickInfo.rowDataunknown[]Row data that the picked layer visualizes.
Python
Arguments
ArgumentTypeDescription
coordinateTuple[``number, number``]Geospatial coordinates [longitude, latitude].
position[number, number]Mouse position relative to the viewport [x, y].
pickInfoPickInfoAdditional context on map data associated with this event.

OnClickHandlerType

Python-exclusive type.

OnClickHandlerType = Callable[([MouseEvent], None)];

OnGeometrySelectionType

Python-exclusive type.

OnGeometrySelectionType = Callable[[GeometrySelectionEvent], None]

OnHoverHandlerType

Python-exclusive type.

OnHoverHandlerType = Callable[[MouseEvent], None]

OnViewUpdateType

Python-exclusive type.

OnViewUpdateType = Callable[[View], None]

PickInfo

Python-exclusive type.

Additional context on map data associated to this event.

class PickInfo():
  layer_id: str
  row_index: Number
  row_data: List[Any]
Arguments
ArgumentTypeDescription
layer_idstringIdentifier of the layer that the mouse event is related to.
row_indexnumberUser facing MapStyle label.
row_dataList[Any]Row data that the picked layer visualizes.

RequestParameters

Allows createMap to transform any requests related to the base map (tiles, source, etc).

type RequestParameters = {
  url: string;
  headers?: {[header: string]: string};
  method?: 'GET' | 'POST' | 'PUT';
Arguments
ArgumentTypeDescription
urlstringThe URL to be requested.
headers{[header: string]: string};The headers to be sent with the request.
methodstringRequest method to use. 'GET', 'POST', or 'PUT'.

SetMapConfigOptions

Options applicable when setting the map configuration.

type SetMapConfigOptions = {
  additionalDatasets?: DatasetCreationProps[]
};
class SetMapConfigOptions():
    additional_datasets: Optional[List[_DatasetCreationProps]]
ArgumentTypeDescription
additionalDatasetsDatasetCreationProps[]Datasets to add to the map before loading the map configuration.

SetSplitModeOptions

Options applicable when setting split map mode.

type SetSplitModeOptions: Partial<SplitModeContext>
ParentDescription
SplitModeContextBase type that contains context around the split map mode.

SidePanelType

Available side panel types.

type SidePanelType = 'layer' | 'column' | 'filter' | 'interaction' | 'map' | 'analysis';

SplitMode

Supported map split modes.

type SplitMode = 'single' | 'dual' | 'swipe';
SplitMode = Literal["single", "dual", "swipe"]

SplitModeProps

Container type for split map mode options.

type SplitModeProps={
    splitMode: SplitMode
    layers: Optional[SplitLayers]
};
class SplitModeProps():
    split_mode: SplitMode
    layers: Optional[SplitLayers]
Javascript
Arguments
ArgumentTypeDescription
splitModeSplitModeSupported split map modes.
layersstring[][]Optional array of layer ids to show on either side of the split. Only applicable for dual and swipe split modes.
Python
Arguments
ArgumentTypeDescription
split_modeSplitModeSupported split map modes.
layersSplitLayersOptional array of layer ids to show on either side of the split. Only applicable for dual and swipe split modes.

SplitModeContext

Base type that contains context around the split map mode.

type SplitModeContext = {
  layers: string[][],
  isViewSynced: boolean,
  isZoomSynced: boolean
};
Arguments
ArgumentTypeDescription
layersstring[][]An array of layer ids to show on either side of the split. Only applicable for multi-view split modes.
isViewSyncedboolBoolean indicating whether views are synced. Only applicable to dual split mode.
isZoomSyncedboolBoolean indicating whether zoom is synced between views. Only applicable to dual split mode.

SplitModeDetails

Container type for split map mode details.

export type SplitModeDetails = {
  splitMode: SplitMode
} & SplitModeContext;
Arguments
ArgumentTypeDescription
splitModeSplitModeSupported split map modes.
SplitModeContextSplitModeContextBase type that contains context around the split map mode.

SplitLayers

Python-exclusive type.

Arrays with layer Ids per each post-split map section.

SplitLayers = List[List[str]]

StudioLoadingProps

Type that allows for studio application customization to be specified.

type StudioLoadingProps = {
  url: string,
  namespace?: string
};
Arguments
ArgumentTypeDescription
urlstringThe URL to load the studio application from.
namespacestringThe name of the object attached to the window that contains createMap function.

SyncWidgetMap

Initializes a new widget map.

Python-exclsuive type.

class SyncWidgetMap(
    self,
    *,
    style: Optional[Dict] = None,
    basemaps: Optional[Dict] = None,
    raster: Optional[Dict] = None,
    studio: Optional[Dict] = None,
)
Arguments
ArgumentTypeDescription
styleDictOptional map container CSS style customization. Uses camelCase as this is React standard.
basemapsDictBasemap customization settings.
basemaps.custom_map_stylesList[MapStyleCreationProps]A set of properties required when specifying a map style.
basemaps.initial_map_stylesstringA mapbox style ID.
rasterDictCustomization related to raster datasets and tiles. Not available when renderer = html
raster.server_urlsList[string]URLs to custom servers to target when serving raster tiles.
raster.stac_search_urlstringURL to pass to the backend for searching a STAC Collection.

ThemeOptions

Python-exclusive type.

lass ThemeOptions():
  background_color: Optional[str]
Arguments
ArgumentTypeDescription
background_colorstringBackground color of UI elements.

ThemePresets

Python-exclusive type.

ThemePresets = Literal["light", "dark"]

ThemeUpdateProps

Map UI theme settings that support customization.

type ThemeUpdateProps = {
  preset: 'light' | 'dark',
  options?: {
    backgroundColor?: CSSColor
  }
};
class ThemeUpdateProps():
    preset: Optional[ThemePresets]
    options: Optional[ThemeOptions]
Javascript
Arguments
ArgumentTypeDescription
presetstringUI theme preset name.
optionsobjectOptional UI theme customization options.
options.backgroundColorCSSColorBackground color of UI elements in a CSS color string.
Python
Arguments
ArgumentTypeDescription
presetThemePresetsUI theme preset name.
optionsThemeOptionsOptional UI theme customization options.

View

Type encapsulating view properties.

type View = {
  longitude: number,
  latitude: number,
  zoom: number,
  pitch: number,
  bearing: number
};
class View(_PartialView):
  longitude: Number
  latitude: Number
  zoom: Number
  pitch: Number
  bearing: Number
Javascript
Arguments
ArgumentTypeDescription
longitudenumberLongitude of the view center [-180, 180].
latitudenumberLatitude of the view center [-90, 90].
zoomnumberView zoom level [0-22].
pitchnumberView pitch value [0-90].
bearingnumberView bearing.
Python
Arguments
ArgumentTypeDescription
longitudenumberLongitude of the view center [-180, 180].
latitudenumberLatitude of the view center [-90, 90].
zoomnumberView zoom level [0-22].
pitchnumberView pitch value [0-90].
bearingnumberView bearing.

ViewLimits

Type encapsulating map view limits.

type ViewLimits = {
  minZoom: number,
  maxZoom: number,
  maxBounds?: Bounds
};
class ViewLimits():
  min_zoom: Number
  max_zoom: Number
  max_bounds: Bounds
Javascript
Arguments
ArgumentTypeDescription
minZoomnumberMinimum allowed zoom level.
maxZoomnumberMaximum allowed zoom level.
maxBoundsBoundsOptional maximum allowed bounds.
Python
Arguments
ArgumentTypeDescription
min_zoomnumberMinimum allowed zoom level.
max_zoomnumberMaximum allowed zoom level.
maxBoundsBoundsOptional maximum allowed bounds.

ViewMode

Supported map view modes.

type ViewMode = '2d' | '3d' | 'globe';