Types
Types Skip link to 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.
Analytics Types Skip link to Analytics Types
AnalyticsEventHandlers Skip link to [object Object]
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.
JavaScript
type AnalyticsEventHandlers = {
onUserEvent?: (event: UserEvent) => void
};
NoPayloadEvents Skip link to [object Object]
JavaScript
export type NoPayloadEvent =
| RemoveDatasetEvent
| AddLayerEvent
| RemoveLayerEvent
| AddLayerGroupEvent
| RemoveLayerGroupEvent;
RasterTileLoadEvent Skip link to [object Object]
A type returning raster tile loading status updates.
JavaScript
assetUrls: string[];
tileIndex: [number, number, number];
remainingTiles: number;
status: 'loading' | 'loaded' | 'canceled';
error?: Error;
| Argument | Type | Description |
|---|---|---|
assetUrls |
string[] |
An array of URLs that the tile assets are being requested from. |
tileIndex |
[number, number, number] |
An array containing tile coordinates [x, y, z]. |
remainingTiles |
number |
Total number of tiles that are being loaded. |
status |
string |
The status of the raster tile loading. Either 'loading', 'loaded', 'canceled', or 'failed'. |
error |
Error |
If an error occurred, an error object describing the loading error. |
UserEvent Skip link to [object Object]
A collection of types of events that are reported by onUserEvent callback.
JavaScript
type UserEvent = NoPayloadEvent | MapControlClickedEvent | SidePanelSectionChangedEvent;
Parameters Skip link to Parameters
MapControlClickedEvent can return a payload with the control modified.
JavaScript
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.
JavaScript
type SidePanelSectionChangedEvent = EventWithPayload<
'change-side-panel-section',
{panel: SidePanelType}
>;
UserEventType Skip link to [object Object]
A collection of types of events that are reported by onUserEvent callback.
JavaScript
type UserEventType =
| 'remove-dataset'
| 'add-layer'
| 'remove-layer'
| 'add-layer-group'
| 'remove-layer-group'
| 'activate-map-control'
| 'change-side-panel-section';
| Argument | Type | Description |
|---|---|---|
'remove-dataset' |
string |
Reported when a user removed a dataset. |
'add-layer' |
string |
Reported when a user adds a layer. |
'remove-layer' |
string |
Reported when a user removes a layer. |
'add-layer-group' |
string |
Reported when a user adds a layer group. |
'activate-map-control' |
string |
Reported when a user activates the map's controls. |
'change-side-panel-section' |
string |
Reported when a user changes side panel sections. |
Annotation Types Skip link to Annotation Types
Annotation Skip link to [object Object]
A callout on the map, including a text label and an optional pointer to a location. See examples in Studio product documentation.
JavaScriptPython
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 Skip link to Javascript
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
id |
string |
The unique identifier of the annotation. |
kind |
`'POINT' | 'CIRCLE' |
isVisible |
boolean |
Whether the annotation should be visible on the map. |
autoSize |
`boolean | undefined` |
autoSizeY |
`boolean | undefined` |
anchorPoint |
AnchorPoint ([lon, lat]) |
The anchor point of the annotation in [lon, lat] format. |
label |
string |
The textual description of the annotation. |
editorState |
EditorState |
The state of the editor. See more information for EditorState |
mapIndex |
`number | undefined` |
lineColor |
string |
The color of the annotation line. |
lineWidth |
number |
The width of the annotation line. |
textWidth |
number |
The width of the annotation text. |
textHeight |
number |
The height of the annotation text. |
textVerticalAlign |
`'top' | 'middle' |
armLength |
number |
The length of the annotation arm in pixels. |
angle |
number |
The angle of the annotation in degrees. |
radiusInMeters |
number |
The radius in meters (only for kind 'CIRCLE'). |
Python Skip link to Python
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
id |
StrictStr |
The unique identifier of the annotation. |
kind |
Literal["TEXT", "ARROW", "POINT", "CIRCLE"] |
The type of annotation. |
is_visible |
StrictBool |
Whether the annotation should be visible on the map. |
auto_size |
Optional[StrictBool] |
Whether the annotation should be auto-sized horizontally to fit the text. |
auto_size_y |
Optional[StrictBool] |
Whether the annotation should be auto-sized vertically to fit the text. |
anchor_point |
Tuple[float, float] |
The anchor point of the annotation. |
label |
StrictStr |
The textual description of the annotation. |
editor_state |
Optional[Any] |
See more information for EditorState |
map_index |
Optional[int] |
The index of the map this annotation is attached to. |
line_color |
StrictStr |
The color of the annotation line. |
line_width |
float |
The width of the annotation line. |
text_width |
float |
The width of the annotation text. |
text_height |
float |
The height of the annotation text. |
text_vertical_align |
Literal["top", "middle", "bottom"] |
The vertical alignment of the annotation text. |
arm_length |
Optional[float] |
The length of the annotation arm in pixels. |
angle |
Optional[float] |
The angle of the annotation in degrees. |
radius_in_meters |
Optional[float] |
The radius in meters (only for kind 'CIRCLE'). |
EditorState Skip link to [object Object]
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 Skip link to Arguments
| Parameter | Type | Description |
|---|---|---|
root |
object |
Root element containing the entire structure. |
root.children[] |
array |
Array of child elements (e.g., paragraphs, text, links). |
root.children[].type |
string |
Specifies element type (text, paragraph, link, linebreak). |
root.children[].version |
number |
Indicates element version (always 1). |
root.children[].detail |
number |
Additional detail for some text elements. |
root.children[].format |
number |
Formatting options (bold, italic, underline). |
root.children[].mode |
string |
Mode of the element (usually "normal"). |
root.children[].style |
string |
Custom styles like color and background-color. |
root.children[].text |
string |
Text content of the element. |
root.children[].direction |
string |
Text direction (usually left to right, or "ltr"). |
root.children[].indent |
number |
Indentation level (always 0). |
root.children[].rel |
string |
Link relationship attribute (for link elements). |
root.children[].target |
string |
Target attribute for links (for link elements). |
root.children[].url |
string |
URL for links (for link elements). |
root.children[].children[] |
array |
Nested array of child elements within a paragraph or other parent element. |
root.children[].children[].type |
string |
Specifies element type within nested elements. |
root.children[].children[].version |
number |
Indicates element version within nested elements. |
root.children[].children[].detail |
number |
Additional detail for nested text elements. |
root.children[].children[].format |
number |
Formatting options for nested elements. |
root.children[].children[].mode |
string |
Mode of the element within nested elements. |
root.children[].children[].style |
string |
Custom styles for nested elements. |
root.children[].children[].text |
string |
Text content of nested elements. |
root.children[].children[].direction |
string |
Text direction for nested elements (usually left to right, or "ltr"), |
root.children[].children[].indent |
number |
Indentation level for nested elements (always 0). |
root.children[].children[].rel |
string |
Link relationship attribute for nested link elements. |
root.children[].children[].target |
string |
Target attribute for nested link elements. |
root.children[].children[].url |
string |
URL for nested link elements. |
Example Skip link to Example
JavaScriptPython
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 Skip link to Dataset Types
AddDatasetOptions Skip link to [object Object]
Javascript-exclusive type.
Options applicable when adding a new dataset.
JavaScript
type AddDatasetOptions = {
autoCreateLayers?: boolean,
centerMap?: boolean
};
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
autoCreateLayers |
boolean |
Whether to attempt and create new layer(s) when adding a dataset. Defaults to true. |
centerMap |
boolean |
Whether to center the map to fit the new layer bounds. Defaults to true. |
BaseDataset Skip link to [object Object]
Properties common to both tabular and tiled datasets.
JavaScriptPython
type BaseDataset = {
id: string,
label: string,
color: RGBColor,
fields: Field[]
};
class BaseDataset():
id: str
type: string
label: str
color: RGBColor
fields: List[Field]
Javascript Skip link to Javascript
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
id |
string |
Unique identifier of the dataset. |
label |
string |
User-facing dataset label. |
color |
RGBColor |
Color label of the dataset. |
fields |
Field[] |
Schema describing the fields of the dataset. |
Python Skip link to Python
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
id |
string |
Unique identifier of the dataset. |
type |
string |
Type of dataset. Can be "local", "vector-tile", or"raster-tile" |
label |
string |
User-facing dataset label. |
color |
RGBColor |
Color label of the dataset. |
fields |
List[ Field] |
Schema describing the fields of the dataset. |
BaseDatasetCreationProps Skip link to [object Object]
Data used to create a dataset, in CSV, JSON, GeoJSON format.
JavaScriptPython
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 Skip link to Javascript
| Parent | Description |
|---|---|
BaseDataset |
Properties common to both tabular and tiled datasets. |
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
data |
string | object | unknown[][] |
Data used to create a dataset, in CSV, JSON, GeoJSON format. |
Python Skip link to Python
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
id |
string |
Unique identifier for the dataset. |
label |
string |
Displayable dataset label. |
color |
RGBColor |
Color label of the dataset. |
data |
Union[str, dict, List[List[Any]]] |
Data used to create a dataset, in CSV, JSON, GeoJSON format. |
BaseField Skip link to [object Object]
The field's unique identifier and user-facing label.
JavaScriptPython
type BaseField = {
name: string,
label: string
};
class BaseField():
name: str
label: str
type: FieldType
Javascript Skip link to Javascript
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
name |
string |
A unique identifier for the field. |
label |
string |
A user-facing field label. |
Python Skip link to Python
Arguments Skip link to Arguments
BasicField Skip link to [object Object]
Contains semantics around a single field in a dataset table.
JavaScriptPython
type BasicField = BaseField & {
type:
| 'boolean'
| 'date'
| 'geojson'
| 'integer'
| 'real'
| 'string'
| 'array'
| 'object'
| 'point'
| 'h3'
};
class BasicField(BaseField):
type: BasicFieldType
| Parent | Description |
|---|---|
BaseField |
The field's unique identifier and user-facing label. |
Javascript Skip link to Javascript
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
type |
string |
Type of the field. |
Python Skip link to Python
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
type |
BasicFieldType |
Type of the field. |
BasicFieldType Skip link to [object Object]
Python exclsuive type.
Available field types.
Python
class BasicFieldType(FieldType):
BOOLEAN = "boolean"
DATE = "date"
GEOJSON = "geojson"
INTEGER = "integer"
REAL = "real"
STRING = "string"
ARRAY = "array"
OBJECT = "object"
POINT = "point"
H3 = "h3"
Dataset Skip link to [object Object]
Dataset record.
JavaScriptPython
type Dataset = LocalDataset | VectorTileDataset | RasterTileDataset;
Dataset = Union[LocalDataset, VectorTileDataset, RasterTileDataset]
| Member | Description |
|---|---|
LocalDataset |
Dataset record representing a local dataset, with data provided by the caller. |
VectorTileDataset |
Dataset record representing a vector tileset. |
RasterTileDataset |
Raster tileset metadata. |
DatasetCreationProps Skip link to [object Object]
A set of properties used to synchronously add a dataset to the map.
JavaScriptPython
type DatasetCreationProps =
| LocalDatasetCreationProps
| VectorTileDatasetCreationProps
| RasterTileDatasetCreationProps;
class DatasetCreationProps() = Union[\
LocalDatasetCreationProps,\
VectorTileDatasetCreationProps,\
RasterTileDatasetCreationProps\
]
| Member | Description |
|---|---|
LocalDatasetCreationProps |
Dataset record representing a local dataset, with data provided by the caller. |
VectorTileDatasetCreationProps |
Dataset record representing a vector tileset. |
RasterTileDatasetCreationProps |
Raster tileset metadata. |
DatasetType Skip link to [object Object]
Python-exclusive type
Types of currently support datasets.
Python
class DatasetType(str, Enum):
LOCAL = "local"
VECTOR_TILE = "vector-tile"
RASTER_TILE = "raster-tile
DatasetUpdateProps Skip link to [object Object]
A set of properties used to update a dataset.
JavaScriptPython
type DatasetUpdateProps = Partial<Pick<Dataset, 'label' | 'color'>>;
class _DatasetUpdateProps():
label: Optional[str]
color: Optional[RGBColor]
fields: Optional[List[Field]]
Python Skip link to Python
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
label |
string |
Displayable dataset label. |
color |
RGBColor |
Color label of the dataset. |
fields |
Optional[List[ Field]] |
Schema describing the fields of the dataset. |
DatasetWithData Skip link to [object Object]
Type encapsulating a dataset record along with its data.
JavaScriptPython
type DatasetWithData = Dataset & {
data: unknown[][]
};
class DatasetWithData(LocalDataset):
data: List[List[Any]]
Javascript Skip link to Javascript
| Parent | Description |
|---|---|
Dataset |
Dataset record. |
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
Dataset |
Dataset |
Type encapsulating dataset properties. |
data |
unknown[][] |
Tabular data backing the dataset, where the order of fields matches the order in Dataset.fields |
Python Skip link to Python
| Parent | Description |
|---|---|
Dataset |
Dataset record representing a local dataset, with data provided by the caller. |
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
data |
List[List[any]] |
Tabular data backing the dataset, where the order of fields matches the order in Dataset.fields |
DrawMode Skip link to [object Object]
Supported map draw modes.
JavaScript
type DrawMode = 'select' | 'polygon' | 'rectangle';
Field Skip link to [object Object]
A unison of available field types.
JavaScriptPython
type Field = BasicField | TimestampField;
Field = Union[BasicField, TimestampField]
| Member | Description |
|---|---|
BasicField |
Contains semantics around a single field in a dataset table. |
TimestampField |
Contains semantics around a single timestamp field in a dataset table. |
LocalDataset Skip link to [object Object]
Dataset record representing a local dataset, with data provided by the caller.
JavaScriptPython
type LocalDataset = BaseDataset & {
type: 'local'
};
class LocalDataset(BaseDataset):
type = DatasetType.LOCAL;
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
type |
string |
Must be "local". |
LocalDatasetCreationProps Skip link to [object Object]
Dataset record representing a local dataset, with data provided by the caller.
JavaScript
LocalDatasetCreationProps = BaseDatasetCreationProps & {
type?: 'local';
data: string | object | unknown[][];
};
| Parent | Description |
|---|---|
BaseDatasetCreationProps |
Data used to create a dataset, in CSV, JSON, GeoJSON format. |
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
BaseDatasetCreationProps |
BaseDatasetCreationProps |
Data used to create a dataset, in CSV, JSON, GeoJSON format. |
type |
string |
Must be "local". |
data |
string, object, unknown[][] |
Data used to create a dataset, in CSV, JSON, GeoJSON format. |
RasterTileCreationMetadata Skip link to [object Object]
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.
JavaScript
type RasterTileCreationMetadata = {
metadataUrl?: string,
type: 'Feature',
stac_version: string,
extensions: string[],
assets: Record<string, any>
};
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
metadataUrl |
string |
URL for tileset metadata. |
type |
string |
Type of the raster tileset. |
stac_version |
string |
STAC version for tileset. |
extensions |
string[] |
An array of extensions the Item implements. |
assets |
Record<string, any>; |
Dictionary of asset objects that can be downloaded, each with a unique key. |
RasterTileDataset Skip link to [object Object]
Raster tileset metadata.
JavaScriptPython
type RasterTileDataset = BaseDataset & {
type: 'raster-tile',
metadata: RasterTileMetadata
};
class RasterTileDataset(BaseDataset):
type = DatasetType.RASTER_TILE
metadata: RasterTileMetadata
Javascript Skip link to Javascript
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
type |
string |
Must be "raster-tile". |
metadata |
RasterTileMetadata |
Raster tileset metadata. |
Python Skip link to Python
Arguments Skip link to Arguments
RasterTileDatasetCreationProps Skip link to [object Object]
Dataset record representing a raster tileset.
JavaScript
type RasterTileDatasetCreationProps = BaseDatasetCreationProps & {
type: 'raster-tile',
metadata: RasterTileCreationMetadata
};
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
type |
string |
Must be "raster-tile". |
metadata |
RasterTileCreationMetadata |
Raster tileset metadata in STAC Item format. |
RasterTileDatasetRemoteCreationProps Skip link to [object Object]
Dataset record representing a raster tileset.
JavaScript
type RasterTileDatasetRemoteCreationProps = BaseDatasetCreationProps & {
type: 'raster-tile',
metadata: RasterTileRemoteMetadata
};
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
type |
string |
Must be "raster-tile". |
metadata |
RasterTileMetadata |
The metadata of the raster tile. |
RasterTileLocalMetadata Skip link to [object Object]
Python-exclusive type
Python
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]
| Parent | Description |
|---|---|
RasterTileBaseMetadata |
Raster tileset metadata. |
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
metadata_url |
string |
URL for tileset metadata. |
type |
string |
Type of the raster tileset. |
stac_version |
string |
STAC version for tilesets. |
stac_extensions |
List[str] |
A list of extensions the Item implements. |
assets |
Dict[str, Any] |
Dictionary of asset objects that can be downloaded, each with a unique key. |
RasterTileMetadata Skip link to [object Object]
Raster tileset metadata.
JavaScriptPython
type RasterTileMetadata = RasterTileCreationMetadata | RasterTileRemoteMetadata;
RasterTileMetadata = Union[RasterTileLocalMetadata, RasterTileRemoteMetadata]
Javascript Skip link to Javascript
| Member | Description |
|---|---|
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. |
RasterTileRemoteMetadata |
Raster tileset metadata with a remote metadata URL. This metadata can be passed to the map to asynchronously load a raster tileset. |
Python Skip link to Python
| Member | Description |
|---|---|
RasterTileLocalMetadata |
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. |
RasterTileRemoteMetadata |
Raster tileset metadata with a remote metadata URL. This metadata can be passed to the map to asynchronously load a raster tileset. |
RasterTileRemoteMetadata Skip link to [object Object]
Raster tileset metadata with a remote metadata URL. This metadata can be passed to the map to asynchronously load a raster tileset.
JavaScriptPython
type RasterTileRemoteMetadata = {
metadataUrl: string
};
class RasterTileRemoteMetadata(RasterTileBaseMetadata):
metadata_url: string
Javascript Skip link to Javascript
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
metadataUrl |
string |
The metadata of the raster tile. |
Python Skip link to Python
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
metadata_url |
string |
The metadata of the raster tile. |
DatasetCreationProps Skip link to [object Object]
Dataset record representing a local dataset, with data provided by the caller.
JavaScript
LocalDatasetCreationProps = BaseDatasetCreationProps & {
type?: 'local';
data: string | object | unknown[][];
};
Arguments Skip link to Arguments
| Argument | Type | Description | ||
|---|---|---|---|---|
type |
string |
Must be "local". |
||
data |
`string | object | unknown[][]` | Data used to create a dataset, in CSV, JSON, GeoJSON format. |
RGBColor Skip link to [object Object]
Red, green, and blue channels of a color in [0-255] range.
JavaScriptPython
type RGBColor = [number, number, number];
RGBColor = Tuple[Number, Number, Number]
ReplaceDatasetOptions Skip link to [object Object]
Javascript-exclusive type.
Options applicable when adding a new dataset.
JavaScript
type ReplaceDatasetOptions = {
force?: boolean,
strict?: boolean
};
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
force |
boolean |
Whether to force a dataset replace, even if the compatibility check fails. Default: false. |
strict |
boolean |
Whether to ensure strict equality of types for each field being replaced. Default: false. |
TileDatasetCreationProps Skip link to [object Object]
A set of properties used to asynchronously add a dataset to the map based on remote files.
JavaScript
type TileDatasetCreationProps =
| VectorTileDatasetRemoteCreationProps
| RasterTileDatasetRemoteCreationProps;
| Member | Description |
|---|---|
VectorTileDatasetRemoteCreationProps |
A set of properties used to create a vector tile dataset with provided metadata. |
RasterTileDatasetRemoteCreationProps |
Dataset record representing a raster tileset. |
TimestampField Skip link to [object Object]
Contains semantics around a single timestamp field in a dataset table.
JavaScriptPython
type TimestampField = BaseField & {
type: 'timestamp',
timeFormat: string
};
class TimestampField(BaseField):
type: TimestampFieldType = TimestampFieldType.TIMESTAMP
time_format: str
| Parent | Description |
|---|---|
BaseField |
The fields's unique identifier and user-facing label. |
Javascript Skip link to Javascript
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
timeformat |
string |
moment.js time format of the field's temporal data. |
Python Skip link to Python
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
type |
TimestampFieldType.TIMESTAMP |
Timestamp type identifier. |
timeformat |
string |
moment.js time format of the field's temporal data. |
VectorTileBaseMetadata Skip link to [object Object]
Vector tileset base metadata.
JavaScriptPython
type VectorTileBaseMetadata = {
dataUrl: string
};
class VectorTileBaseMetadata():
data_url: string
Javascript Skip link to Javascript
| Parent | Description |
|---|---|
VectorTileMetadata |
Vector tileset metadata with a remote metadata URL. |
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
dataUrl |
string |
URL template for tiles, with {x}/{y}/{z} placeholders |
Python Skip link to Python
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
data_url |
string |
URL template for tiles, with {x}/{y}/{z} placeholders |
VectorTileCreationMetadata Skip link to [object Object]
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.
JavaScript
type VectorTileCreationMetadata = VectorTileBaseMetadata & {
metadataUrl?: string,
bounds?: string | number[],
center?: string | number[],
maxzoom?: number,
minzoom?: number,
json: string | VectorTileEmbeddedMetadata
};
| Parent | Description |
|---|---|
VectorTileBaseMetadata |
Vector tileset base metadata. |
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
VectorTileBaseMetadata |
VectorTileBaseMetadata |
Vector tileset base metadata. |
metadataUrl |
string |
URL for tileset metadata. |
bounds |
string, number[] |
Tileset bounds, as an array or comma-delimited string in format "w,s,e,n". |
center |
string, number[] |
Tileset center, as an array or comma-delimited string in format "lng,lat". |
maxzoom |
number |
Maximum zoom supported by the tileset. |
minzoom |
number |
Minimum zoom supported by the tileset. |
json |
string or VectorTileEmbeddedMetadata |
Metadata for the tileset, as a JSON string or object. |
VectorTileDataset Skip link to [object Object]
Dataset record representing a vector tileset.
JavaScriptPython
type VectorTileDataset = BaseDataset & {
type: 'vector-tile',
metadata: VectorTileMetadata
};
class VectorTileDataset(BaseDataset):
type = DatasetType.VECTOR_TILE
metadata: VectorTileMetadata
Javascript Skip link to Javascript
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
type |
string |
Must be vector-tile. |
metadata |
VectorTileMetadata |
Vector tileset metadata with a remote metadata URL. |
Python Skip link to Python
Arguments Skip link to Arguments
VectorTileDatasetCreationProps Skip link to [object Object]
A set of properties used to create a vector tile dataset with provided metadata.
JavaScript
type VectorTileDatasetCreationProps = BaseDatasetCreationProps & {
type: 'vector-tile',
metadata: VectorTileCreationMetadata
};
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
type |
string |
Must be vector-tile. |
metadata |
VectorTileCreationMetadata |
Vector tileset metadata, following the metadata format generated by Tippecanoe. |
VectorTileDatasetRemoteCreationProps Skip link to [object Object]
A set of properties used to create a vector tile dataset with provided metadata.
JavaScript
type VectorTileDatasetRemoteCreationProps = BaseDatasetCreationProps & {
type: 'vector-tile',
metadata: VectorTileRemoteMetadata
};
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
type |
string |
Must be vector-tile. |
metadata |
VectorTileRemoteMetadata |
Vector tileset metadata with a remote metadata URL. |
VectorTileLocalMetadata Skip link to [object Object]
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
Python
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]
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
metadata_url |
string |
URL for tileset metadata. |
bounds |
Union[str, List[Number]] |
Tileset bounds, as an array or comma-delimited string in format "w,s,e,n". |
center |
Union[str, List[Number]] |
Tileset center, as an array or comma-delimited string in format "lng,lat". |
maxZoom |
Number |
Maximum zoom supported by the tileset. |
minzoom |
Number |
Minimum zoom supported by the tileset. |
VectorTileMetadata Skip link to [object Object]
Vector tileset metadata.
JavaScriptPython
type VectorTileMetadata = VectorTileCreationMetadata | VectorTileRemoteMetadata;
VectorTileMetadata = Union[VectorTileLocalMetadata, VectorTileRemoteMetadata]
Javascript Skip link to Javascript
| Member | Description |
|---|---|
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. |
VectorTileRemoteMetadata |
Vector tileset metadata. |
Python Skip link to Python
| Member | Description |
|---|---|
VectorTileLocalMetadata |
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 |
VectorTileRemoteMetadata |
Vector tileset metadata. |
VectorTileRemoteMetadata Skip link to [object Object]
Vector tileset metadata.
JavaScriptPython
type VectorTileRemoteMetadata = VectorTileBaseMetadata & {
metadataUrl: string
};
class VectorTileRemoteMetadata(VectorTileBaseMetadata):
metadata_url: string
Javascript Skip link to Javascript
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
metadataUrl |
string |
URL for tileset metadata. |
Python Skip link to Python
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
metadata_url |
string |
URL for tileset metadata. |
Filter Types Skip link to Filter Types
BaseFilter Skip link to [object Object]
Type encapsulating common filter properties.
JavaScriptPython
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 Skip link to Javascript
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
id |
string |
Unique identifier of the filter. |
type |
FilterType |
Type of the filter. |
sources |
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. |
value |
Value |
Value to base the filters on. |
Python Skip link to Python
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
id |
string |
Unique identifier of the filter. |
type |
FilterType |
Type of the filter. |
sources |
List[ 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. |
value |
Any | Value to base the filters on. |
Filter Skip link to [object Object]
Union of available filter types.
JavaScriptPython
type Filter = RangeFilter | SelectFilter | TimeRangeFilter | MultiSelectFilter;
Filter = Union[\
RangeFilter,\
SelectFilter,\
TimeRangeFilter,\
MultiSelectFilter,\
]
| Member | Description |
|---|---|
RangeFilter |
Filter type that filters a range of values. |
SelectFilter |
Filter type that filters based on a boolean value. |
TimeRangeFilter |
Filter type that filters data within a range of time. |
MultiSelectFilter |
Filter type that filters based on multiple string values. |
FilterCreationProps Skip link to [object Object]
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.
JavaScriptPython
type FilterCreationProps = Optional<
Omit<Filter, 'sources'> & {sources: PartialFilterSource[]},
'id'
>;`
FilterCreationProps = _PartialFilter
| Parent | Description |
|---|---|
Filter |
Union of available filter types. |
FilterEventHandlers Skip link to [object Object]
A set of event handlers that are called on appropriate filter events.
JavaScriptPython
type FilterEventHandlers = {
onFilterUpdate?: (filter: Filter) => void
};
class FilterEventHandlers():
on_filter_update: Optional[Callable[[Filter], None]]
FilterSource Skip link to [object Object]
Source that the filter is applied to.
JavaScriptPython
type FilterSource = {
dataId: string,
fieldName: string
};
class FilterSource():
data_id: str
field_name: str
Javascript Skip link to Javascript
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
dataId |
string |
Identifier of the dataset that the filter applies to. |
fieldName |
string |
Field to filter by. The field identifier defaults to the field name and can be retrieved as part of the dataset record. |
Python Skip link to Python
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
data_id |
string |
Identifier of the dataset that the filter applies to. |
field_name |
string |
Field to filter by. The field identifier defaults to the field name and can be retrieved as part of the dataset record. |
FilterTimeline Skip link to [object Object]
Time range filter properties that encapsulate timeline interaction.
JavaScriptPython
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 Skip link to Javascript
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
view |
string |
Current timeline presentation. |
timeFormat |
string |
Time format that the timeline is using in day.js supported format. |
timezone |
string |
Timezone that the timeline is using in tz format. |
isAnimating |
boolean |
Flag indicating whether the timeline is animating or not. |
animationSpeed |
number |
Speed at which timeline is animating. |
step |
number |
Minimum animation step size in milliseconds. |
Python Skip link to Python
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
view |
FilterView |
Current timeline presentation. |
time_format |
string |
Time format that the timeline is using in day.js supported format. |
timezone |
string |
Timezone that the timeline is using in tz format. |
is_animating |
boolean |
Flag indicating whether the timeline is animating or not. |
animation_speed |
number |
Speed at which timeline is animating. |
step |
number |
Minimum animation step size in milliseconds. |
FilterTimelineUpdateProps Skip link to [object Object]
A set of properties that can be updated on a timeline.
JavaScriptPython
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 Skip link to Javascript
| Parent | Type | Description |
|---|---|---|
FilterTimeline |
FilterTimeline |
A partial FilterTimeline object. |
Python Skip link to Python
Arguments Skip link to Arguments
FilterType Skip link to [object Object]
Types of currently supported filters.
JavaScriptPython
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 Skip link to [object Object]
A set of properties used to update a filter.
JavaScriptPython
type FilterUpdateProps = Partial<Pick<Filter, 'value'> & {sources: PartialFilterSource[]}>;
FilterUpdateProps = _PartialFilter
FilterView Skip link to [object Object]
Python-exclusive type.
A union of filter views.
Python
Literal["side", "enlarged", "minified"]
MultiSelectFilter Skip link to [object Object]
Filter type that filters based on a multiple string value.
JavaScriptPython
type MultiSelectFilter = BaseFilter<'multi-select', string[]>;
class MultiSelectFilter(BaseFilter):
type = FilterType.MULTI_SELECT
value: List[str]
| Parent | Description |
|---|---|
BaseFilter |
Type encapsulating common filter properties. |
PartialFilterSource Skip link to [object Object]
Partially defined filter source where the dataId can be left out.
JavaScriptPython
type PartialFilterSource = Optional<FilterSource, 'dataId'>;
PartialFilter = Union[\
PartialRangeFilter,\
PartialSelectFilter,\
PartialTimeRangeFilter,\
PartialMultiSelectFilter,\
]
| Parent | Description |
|---|---|
FilterSource |
Source that the filter is applied to. |
RangeFilter Skip link to [object Object]
Filter type that filters a range of values.
JavaScriptPython
type RangeFilter = BaseFilter<'range', Range>;
class RangeFilter(BaseFilter):
type = FilterType.RANGE
value: Range
SelectFilter Skip link to [object Object]
Filter type that filters based on a boolean value.
JavaScriptPython
type SelectFilter = BaseFilter<'select', boolean>;
class SelectFilter(BaseFilter):
type = FilterType.SELECT
value: bool
TimeRangeFilter Skip link to [object Object]
JavaScriptPython
type TimeRangeFilter = BaseFilter<'time-range', TimeRange> & {
domain: TimeRange,
timeline: FilterTimeline
};
class TimeRangeFilter(BaseFilter):
type = FilterType.TIME_RANGE
value: TimeRange
domain: TimeRange
timeline: FilterTimeline
Javascript Skip link to Javascript
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
domain |
timeRange |
Time domain of the dataset this filter is being applied to. |
timeline |
FilterTimeline |
Time range filter timeline information. |
Python Skip link to Python
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
type |
FilterType.TIME_RANGE |
The time range filter type. |
value |
timeRange |
The range of time this filter is being applied to. |
domain |
timeRange |
Time domain of the dataset this filter is being applied to. |
timeline |
FilterTimeline |
Time range filter timeline information. |
Layer Types Skip link to Layer Types
Types of layers that the visualization is supported for.
Layer Skip link to [object Object]
Type encapsulating layer properties.
JavaScriptPython
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 Skip link to Javascript
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
id |
string |
Unique identifier of the layer. |
type |
LayerType |
Type of the layer. |
dataId |
string |
Unique identifier of the dataset this layer visualizes. |
fields |
Record<string, string> |
Dictionary that maps fields that the layer requires for visualization to appropriate dataset fields. |
label |
string |
Canonic label of this layer. |
isVisible |
boolean |
Flag indicating whether layer is visible or not. |
config |
LayerConfig |
Layer configuration specific to its type. |
Python Skip link to Python
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
id |
string |
Unique identifier of the layer. |
type |
LayerType |
Type of the layer. |
data_id |
string |
Unique identifier of the dataset this layer visualizes. |
fields |
Dict[str, Optional[str]] |
Dictionary that maps fields that the layer requires for visualization to appropriate dataset fields. |
label |
string |
Canonic label of this layer. |
is_visible |
boolean |
Flag indicating whether layer is visible or not. |
config |
LayerConfig |
Layer configuration specific to its type. |
LayerConfig Skip link to [object Object]
Internal layer configuration.
JavaScriptPython
type LayerConfig = {
visualChannels: VisualChannels,
visConfig: Record<string, unknown>
columnMode?: 'points' | 'geojson' | 'table' | 'neighbors' | 'LAT_LNG' | 'H3';
};
class LayerConfig(PartialLayerConfig):
visual_channels: VisualChannels
vis_config: Dict[str, Any]
column_mode: Optional[\
Literal["points", "geojson", "table", "neighbors", "LAT_LNG", "H3"]\
]
Javascript Skip link to Javascript
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
visualChannels |
VisualChannels |
Dictionary of visualization properties that the layer supports. |
visConfig |
Record<string, unknown>; |
General layer settings. |
columnMode |
string |
Column mode for the layer, relevant only to layers that support multiple input data formats (such as the Trip layer). Can be 'points', 'geojson', 'table', 'neighbors', 'LAT_LNG', 'H3'. |
Python Skip link to Python
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
visual_channels |
VisualChannels |
Dictionary of visualization properties that the layer supports. |
vis_config |
Dict[str, Any] |
General layer settings. |
column_mode |
string |
Column mode for the layer, relevant only to layers that support multiple input data formats (such as the Trip layer). Can be 'points', 'geojson', 'table', 'neighbors', 'LAT_LNG', 'H3'. |
LayerCreationProps Skip link to [object Object]
A set of properties used to create a layer.
JavaScriptPython
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 Skip link to Python
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
id |
string |
Unique identifier of the layer. |
type |
LayerType |
Type of the layer. |
data_id |
string |
Unique identifier of the dataset this layer visualizes. |
fields |
Dict[str, Optional[str]] |
Dictionary that maps fields that the layer requires for visualization to appropriate dataset fields. |
label |
string |
Canonical label of this layer. |
is_visible |
bool |
Flag indicating whether layer is visible or not. |
config |
PartialLayerConfig |
Layer configuration specific to its type. |
LayerEventHandlers Skip link to [object Object]
A set of event handlers that are called on appropriate layer events.
JavaScriptPython
type LayerEventHandlers = {
onLayerTimelineUpdate?: (layerTimeline: LayerTimeline) => void
};
class LayerEventHandlers():
on_layer_timeline_update: Callable[[LayerTimeline], None]
LayerTimeline Skip link to [object Object]
Type encapsulating layer timeline properties.
JavaScriptPython
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 Skip link to Javascript
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
currentTime |
number |
Current time on the timeline in milliseconds. |
domain |
timeRange |
Range of time that the timeline shows. |
isAnimating |
boolean |
Flag indicating whether the timeline is animating or not. |
isVisible |
boolean |
Flag indicating whether the timeline is visible or not. |
animationSpeed |
number |
Speed at which timeline is animating. |
timeFormat |
string |
Time format that the timeline is using in day.js supported format. |
timezone |
string |
Timezone that the timeline is using in tz format. |
timeSteps |
number[] |
Step duration for all the animation keyframes in milliseconds. |
Python Skip link to Python
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
current_time |
number |
Current time on the timeline in milliseconds. |
domain |
timeRange |
Range of time that the timeline shows. |
is_animating |
boolean |
Flag indicating whether the timeline is animating or not. |
is_visible |
boolean |
Flag indicating whether the timeline is visible or not. |
animation_speed |
number |
Speed at which timeline is animating. |
time_format |
string |
Time format that the timeline is using in day.js supported format. |
timezone |
string |
Timezone that the timeline is using in tz format. |
time_steps |
List[Number]] |
Step duration for all the animation keyframes in milliseconds. |
LayerGroup Skip link to [object Object]
A conceptual group used to organize layers.
JavaScriptPython
type LayerGroup = {
id: string,
label: string,
isVisible: boolean,
layerIds: string[]
};
class LayerGroup:
id: StrictStr
label: StrictStr
is_visible: StrictBool
layers: List[StrictStr]
Javascript Skip link to Javascript
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
id |
string |
Unique identifier of the layer group. |
label |
string |
Canonical label of this group. |
isVisible |
boolean |
Flag indicating whether layer group is visible or not. |
layerIds |
string[] |
Layers that are part of this group, sorted in the order in which they are shown. |
Python Skip link to Python
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
id |
string |
Unique identifier of the layer group. |
label |
string |
Canonical label of this group. |
is_visible |
boolean |
Flag indicating whether layer group is visible or not. |
layers |
List[string] |
Layers that are part of this group, sorted in the order in which they are shown. |
LayerTimelineUpdateProps Skip link to [object Object]
JavaScriptPython
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 Skip link to Python
Arguments Skip link to Arguments
| Argument | Type | Description |
|---|---|---|
current_time |
number |
Current time on the timeline in milliseconds. |
is_animating |
boolean |
Flag indicating whether the timeline is animating or not. |
is_visible |
boolean |
Flag indicating whether the timeline is visible or not. |
animation_speed |
number |
Speed at which timeline is animating. |
time_format |
string |
Time format that the timeline is using in day.js supported format. |
timezone |
string |
Timezone that the timeline is using in tz format. |
LayerType Skip link to [object Object]
JavaScriptPython
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 Skip link to [object Object]
A set of properties used to update a layer.
JavaScriptPython
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 [Skip link to Python](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#python-26)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-58)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `type` | `number` | Type of the layer. |\
| `data_id` | `string` | Unique identifier of the dataset this layer visualizes. |\
| `fields` | `Dict[str, Optional[str]]` | Dictionary that maps fields that the layer requires for visualization to appropriate dataset fields. |\
| `label` | `string` | Canonical label of this layer. |\
| `is_visible` | `bool` | Flag indicating whether layer is visible or not. |\
| `config` | [`PartialLayerConfig`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#partiallayerconfig) | Layer configuration specific to its type. |\
\
* * *\
\
#### `PartialLayerConfig` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#partiallayerconfig)\
\
_Python-exclusive type._\
\
Python\
\
```python\
class PartialLayerConfig():\
visual_channels: Optional[VisualChannels]\
vis_config: Optional[Dict[str, Any]]\
```\
\
##### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-59)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `visual_channels` | [`VisualChannels`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#visualchannels) | Dictionary of visualization properties that the layer supports. |\
| `vis_config` | `[Dict[str, Any]]` | General layer settings. |\
\
* * *\
\
#### `TileDatasetCreationProps` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#tiledatasetcreationprops-1)\
\
A set of properties used to asynchronously add a dataset to the map based on remote vector or raster tileset files.\
\
JavaScript\
\
```javascript\
type TileDatasetCreationProps =\
| VectorTileDatasetRemoteCreationProps\
| RasterTileDatasetRemoteCreationProps;\
`}\
```\
\
| Member | Description |\
| --- | --- |\
| [`VectorTileDatasetRemoteCreationProps`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#vectortiledatasetremotecreationprops) | A set of properties used to create a vector tile dataset with provided metadata. |\
| [`RasterTileDatasetRemoteCreationProps`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#rastertiledatasetremotecreationprops) | Dataset record representing a raster tileset. |\
\
* * *\
\
#### `VisualChannel` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#visualchannel)\
\
_Python-exclusive type._\
\
A dictionary of visualization properties that the layer supports.\
\
Python\
\
```python\
class VisualChannel():\
name: str\
type: str\
```\
\
* * *\
\
#### `VisualChannels` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#visualchannels)\
\
A dictionary of visualization properties that the layer supports.\
\
JavaScriptPython\
\
```javascript\
type VisualChannels = {\
[key: string]:\
| {\
name: string,\
type: string\
}\
| string\
| null\
};\
```\
\
```python\
VisualChannels =\
Dict[str, Union[VisualChannel, str, None]]\
```\
\
* * *\
\
### Map Types [Skip link to Map Types](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#map-types)\
\
#### `Bounds` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#bounds)\
\
Type representing map bounds.\
\
JavaScriptPython\
\
```javascript\
type Bounds = {\
minLongitude: number,\
maxLongitude: number,\
minLatitude: number,\
maxLatitude: number\
};\
```\
\
```python\
class Bounds():\
min_longitude: Number\
max_longitude: Number\
min_latitude: Number\
max_latitude: Number\
```\
\
##### Javascript [Skip link to Javascript](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#javascript-23)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-60)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `minLongitude` | `number` | Minimum (left) longitude value. |\
| `maxLongitude` | `number` | Maximum (right) longitude value. |\
| `minLatitude` | `number` | Minimum (bottom) latitude value. |\
| `maxLatitude` | `number` | Maximum (top) latitude value. |\
\
##### Python [Skip link to Python](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#python-27)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-61)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `min_longitude` | `number` | Minimum (left) longitude value. |\
| `max_longitude` | `number` | Maximum (right) longitude value. |\
| `min_latitude` | `number` | Minimum (bottom) latitude value. |\
| `max_latitude` | `number` | Maximum (top) latitude value. |\
\
* * *\
\
#### `Effect` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#effect)\
\
A visual [post-processing effect](https://docs.foursquare.com/studio/docs/maps-effects) to apply to the map.\
\
JavaScriptPython\
\
```javascript\
type Effect = {\
id: string;\
type: EffectType;\
isEnabled: boolean;\
parameters: Record<string, number | [number, number] | [number, number, number] | string>;\
};\
```\
\
```python\
class Effect():\
id: StrictStr\
type: EffectType\
is_enabled: StrictBool\
parameters: Optional[\
Dict[StrictStr, Union[Number, List[Number], StrictBool, StrictStr]]\
]\
```\
\
##### Javascript [Skip link to Javascript](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#javascript-24)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-62)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| id | `string` | Unique identifier of the effect. |\
| type | [`EffectType`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#effecttype) | The type of the effect. |\
| isEnabled | `bool` | Flag indicating whether the effect is enabled or not. |\
| parameters | `dict` | Effect-specific settings. |\
\
##### Python [Skip link to Python](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#python-28)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-63)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| id | `string` | Unique identifier of the effect. |\
| type | [`EffectType`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#effecttype) | The type of the effect. |\
| is\_enabled | `bool` | Flag indicating whether the effect is enabled or not. |\
| parameters | `dict` | Effect-specific settings. |\
\
* * *\
\
#### `EffectCreationProps` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#effectcreationprops)\
\
A set of optional properties used to create an effect. See [effect](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#effect).\
\
JavaScriptPython\
\
```javascript\
EffectCreationProps = Optional<Effect, 'id' | 'isEnabled' | 'parameters'>;\
```\
\
```python\
_EffectCreationProps(_EffectUpdateProps):\
id: Optional[StrictStr]\
type: Optional[EffectType]\
is_enabled: Optional[StrictBool]\
parameters: Optional[\
Dict[StrictStr, Union[Number, List[Number], StrictBool, StrictStr]]\
]\
```\
\
--\
\
#### `EffectType` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#effecttype)\
\
The type of effect to use.\
\
JavaScriptPython\
\
```javascript\
type EffectType =\
| 'ink'\
| 'brightness-contrast'\
| 'hue-saturation'\
| 'vibrance'\
| 'sepia'\
| 'dot-screen'\
| 'color-halftone'\
| 'noise'\
| 'triangle-blur'\
| 'zoom-blur'\
| 'tilt-shift'\
| 'edge-work'\
| 'vignette'\
| 'magnify'\
| 'hexagonal-pixelate'\
| 'light-and-shadow';\
```\
\
```python\
EffectType = [\
'ink',\
'brightness-contrast',\
'hue-saturation',\
'vibrance',\
'sepia',\
'dot-screen',\
'color-halftone',\
'noise',\
'triangle-blur',\
'zoom-blur',\
'tilt-shift',\
'edge-work',\
'vignette',\
'magnify',\
'hexagonal-pixelate',\
'light-and-shadow'\
]\
```\
\
* * *\
\
#### `EffectUpdateProps` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#effectupdateprops)\
\
A set of optional properties used to update an effect. See [effect](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#effect).\
\
JavaScriptPython\
\
```javascript\
EffectUpdateProps = Omit<PartialWithoutId<Effect>, 'type'>;\
```\
\
```python\
_EffectUpdateProps(CamelCaseBaseModel):\
is_enabled: Optional[StrictBool]\
parameters: Optional[\
Dict[StrictStr, Union[Number, List[Number], StrictBool, StrictStr]]\
]\
```\
\
* * *\
\
#### `GeometrySelectionEvent` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#geometryselectionevent)\
\
Geometry selection event containing an array of GeoJSON polygon features.\
\
JavaScriptPython\
\
```javascript\
type GeometrySelectionEvent = {\
features: Feature<Polygon>[]\
};\
```\
\
```python\
class GeometrySelectionEvent():\
features: List[Feature[Polygon, Any]]\
```\
\
* * *\
\
#### `HTMLMap` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#htmlmap)\
\
_Python exclsuive type._\
\
Python\
\
```python\
class HTMLMap(\
self,\
style: Optional[Dict] = None,\
basemaps: Optional[Dict] = None,\
)`\
```\
\
##### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-64)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `style` | `Dict` | Optional map container CSS style customization. Uses camelCase as this is React standard. |\
| `basemaps` | `Dict` | Basemap customization settings. |\
| `basemaps.custom_map_styles` | `List[` [`MapStyleCreationProps`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#mapstylecreationprops)`]` | A set of properties required when specifying a map style. |\
| `basemaps.initial_map_styles` | `string` | A mapbox style ID. |\
\
* * *\
\
#### `MapControlVisibility` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#mapcontrolvisibility)\
\
A map of map control component visibility.\
\
JavaScriptPython\
\
```javascript\
type MapControlVisibility = {\
[control in MapControls]: boolean;\
};\
```\
\
```python\
class MapControlVisibility():\
legend: bool\
toggle_3d: bool\
split_map: bool\
map_draw: bool\
```\
\
##### Python [Skip link to Python](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#python-29)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-65)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `legend` | `bool` | Whether the legend is visible. |\
| `toggle_3d` | `bool` | Whether the 3D toggle is visible. |\
| `split_map` | `bool` | Whether the split map button is visible. |\
| `map_draw` | `bool` | Whether the map draw button is visible. |\
\
* * *\
\
#### `MapControls` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#mapcontrols)\
\
_Javascript-exclusive type._\
\
Map controls that support customization.\
\
JavaScript\
\
```javascript\
type MapControls = 'legend' | 'toggle-3d' | 'split-map' | 'map-draw';\
```\
\
* * *\
\
#### `MapCreationProps` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#mapcreationprops)\
\
A set of properties used to initialize the map.\
\
JavaScript\
\
```javascript\
type MapCreationProps = {\
container?: HTMLElement,\
style?: CSSProperties,\
eventHandlers?: MapEventHandlers,\
showPlaceholder?: boolean,\
initialState?: {\
publishedMapId: string;\
};\
basemaps?: {\
customMapStyles?: MapStyleCreationProps[],\
initialMapStyleId?: string,\
mapboxAccessToken?: string,\
transformRequest?: (opts: {url: string}) => RequestParameters\
},\
raster?: {\
serverUrls?: string[],\
stacSearchUrl?: string\
onTileLoadUpdate?: RasterTileLoadEvent\
},\
uiConfig?: {\
mapName?: string,\
sidePanel?: {\
view?: 'hidden' | 'collapsed' | 'visible',\
isAddLayerVisible?: boolean,\
addDataButton?: {\
onClick?: () => void\
}\
},\
exportEnabled?: boolean;\
sideNav?: {\
isVisible?: boolean\
}\
}\
};\
```\
\
##### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-66)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `container` | `HTMLElement` | DOM element to embed map into. |\
| `style` | `CSSProperties` | Map container CSS style customization. |\
| `eventHandlers` | [`MapEventHandlers`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#mapeventhandlers) | Event handlers to attach to the map. |\
| `showPlaceholder` | `bool` | Visibility of loading screen placeholder. Default: `true` |\
| `initialState` | `object` | Information about the state to load upon creation. |\
| `initialState.publishedMapID` | `string` | Identifier of the map to load. Note: the map must be [published](https://docs.foursquare.com/studio/docs/publish) (currently an action available in the Studio UI). _Not_ supported in the [on-prem SDK](https://docs.foursquare.com/developer/docs/studio-map-sdk-introduction#on-prem-features). |\
| `basemaps` | `object` | Basemap customization settings. |\
| `basemaps.customMapStyles` | [`MapStyleCreationProps[]`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#mapstylecreationprops) | Custom map styles to make available for usage. |\
| `basemaps.mapboxAccessToken` | `string` | Mapbox token to be used when loading the provided custom map styles. |\
| `basemaps.initialMapStyleId` | `string` | Identifier for the map style to be used initially. |\
| `transformRequest` | `function` | Function to transform basemap resource requests. |\
| `raster` | `object` | <br> Customization related to raster datasets and tiles. |\
| `raster.serverUrls` | `string[]` | <br> URLs to custom servers to target when serving raster tiles. |\
| `raster.stacSearchUrls` | `string` | <br> URL to pass to the backend for searching a STAC Collection. |\
| `raster.onTileLoadUpdate` | [`RasterTileLoadEvent`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#doc:studio-map-sdk-types#rastertileloadevent) | <br> Called whenever a raster layer tile loading status updates. |\
| `uiConfig` | `object` | <br> UI configuration object. |\
| `uiConfig.mapName` | `string` | <br> Name of the map to show in the title. Default = `Studio` |\
| `uiConfig.sidePanel` | `object` | <br> A UI component displaying options for data, layer, and map manipulation. |\
| `uiConfig.sidePanel.view` | `string` | <br> View state of the side panel. Options include `'hidden'`,`'collapsed'`, or `'visible'`. |\
| `uiConfig.sidePanel.isAddLayerVisible` | `bool` | <br> When enabled, display the "Add Layer" button. |\
| `uiConfig.sidePanel.addDataButton` | `object` | <br> Custom settings for the Add Data button. |\
| `uiConfig.sidePanel.addDatabutton.onClick` | | <br> Custom event handler for the Add Data button. |\
| `uiConfig.exportEnabled` | `bool` | <br> When enabled, users may export data from the map via the **Export** button. |\
| `urls.staticAssetUrlBase` | `string` | <br> Custom URL base for static assets. |\
| `urls.applicationUrlBase` | `string` | <br> Custom URL base for workers and other script resources loaded by the SDK. |\
\
* * *\
\
#### `MapEventHandlers` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#mapeventhandlers)\
\
A set of event handlers that are called on appropriate map events.\
\
JavaScriptPython\
\
```javascript\
type MapEventHandlers = {\
onClick?: (event: MouseEvent) => void,\
onHover?: (event: MouseEvent) => void,\
onViewUpdate?: (view: View) => void,\
onGeometrySelection?: (event: GeometrySelectionEvent) => void\
} & LayerEventHandlers &\
FilterEventHandlers;\
```\
\
```python\
class MapEventHandlers():\
on_click: Optional[OnClickHandlerType]\
on_hover: Optional[OnHoverHandlerType]\
on_view_update: Optional[OnViewUpdateType]\
on_geometry_selection: Optional[OnGeometrySelectionType]\
```\
\
##### Javascript [Skip link to Javascript](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#javascript-25)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-67)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `onClick` | (event: [MouseEvent](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#mouseevent)) | Called whenever user clicks the visible part of the map. |\
| `onHover` | (event: [MouseEvent](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#mouseevent)) | Called whenever a mouse hovers over a visible part of the map. |\
| `onViewUpdate` | (view: [View](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#view)) | Called whenever visible map viewport changes. |\
| `onGeometrySelection` | (event: [GeometrySelectionEvent](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#geometryselectionevent)) | Called whenever a geometry is selected on the map. |\
| `AnalyticsEventHandlers` | (event: [UserEvent](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#userevent)) | Called whenever a user-triggered event happens. |\
\
##### Python [Skip link to Python](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#python-30)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-68)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `on_click` | [`OnClickHandlerType`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#onclickhandlertype) | Called whenever user clicks the visible part of the map. |\
| `on_hover` | [`OnHoverHandlerType`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#onhoverhandlertype) | Called whenever a mouse hovers over a visible part of the map. |\
| `on_view_update` | [`OnViewUpdateType`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#onviewupdatetype) | Called whenever visible map viewport changes. |\
| `on_geometry_selection_event` | [`OnGeometrySelectionType`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#ongeometryselectiontype) | Called whenever a geometry is selected on the map. |\
\
* * *\
\
#### `MapStyle` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#mapstyle)\
\
Unique identifier of the MapStyle.\
\
JavaScriptPython\
\
```javascript\
type MapStyle = {\
id: string,\
label: string,\
url: string,\
thumbnailUrl: string,\
layerGroups: MapStyleLayerGroup[]\
};\
```\
\
```python\
class MapStyle():\
id: str\
label: str\
url: str\
thumbnail_url: str\
layer_groups: List[MapStyleLayerGroup]\
```\
\
##### Javascript [Skip link to Javascript](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#javascript-26)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-69)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `id` | `string` | Unique identifier of the MapStyle. |\
| `label` | `string` | User facing MapStyle label. |\
| `url` | `string` | URL of the MapStyle descriptor json in Mapbox style format. |\
| `thumbnailUrl` | `string` | URL of the thumbnail to show alongside the MapStyle. |\
| `layerGroups` | [`MapStyleLayerGroup[]`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#MapStylelayergroup) | An array of MapStyle layer groups. |\
\
##### Python [Skip link to Python](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#python-31)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-70)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `id` | `string` | Unique identifier of the MapStyle. |\
| `label` | `string` | User facing MapStyle label. |\
| `url` | `string` | URL of the MapStyle descriptor json in Mapbox style format. |\
| `thumbnail_url` | `string` | URL of the thumbnail to show alongside the MapStyle. |\
| `layer_groups` | `List[` [`MapStyleLayerGroup`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#MapStylelayergroup)`]` | An array of MapStyle layer groups. |\
\
* * *\
\
#### `MapStyleCreationProps` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#mapstylecreationprops)\
\
A set of properties required when specifying a MapStyle.\
\
JavaScriptPython\
\
```javascript\
type MapStyleCreationProps = Merge<\
Optional<MapStyle, 'id' | 'thumbnailUrl'>,\
{layerGroups?: MapStyleLayerGroupCreationProps[]}\
>;\
```\
\
```python\
class MapStyleCreationProps():\
id: Optional[str]\
thumbnail_url: Optional[str]\
layer_groups: Optional[List[MapStyleLayerGroupCreationProps]]\
```\
\
##### Python [Skip link to Python](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#python-32)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-71)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `id` | `string` | Unique identifier of the MapStyle. |\
| `thumbnail_url` | `string` | User facing MapStyle label. |\
| `thumbnail_groups` | `string` | URL of the MapStyle descriptor json in Mapbox style format. |\
\
* * *\
\
#### `MapStyleLayerGroup` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#mapstylelayergroup)\
\
A grouping concept for MapStyle layers, allowing for interaction on a set of layers.\
\
JavaScriptPython\
\
```javascript\
type MapStyleLayerGroup = {\
label: string,\
defaultVisibility: boolean\
};\
```\
\
```python\
class MapStyleLayerGroup():\
label: str\
default_visibility: bool\
```\
\
##### Javascript [Skip link to Javascript](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#javascript-27)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-72)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `label` | `string` | Layer group text representation. Currently supported labels are: label, road, border, building, water, land, 3d building. |\
| `defaultVisibility` | `boolean` | Whether this group should be visible by default. |\
\
##### Python [Skip link to Python](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#python-33)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-73)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `label` | `string` | Layer group text representation. Currently supported labels are: label, road, border, building, water, land, 3d building. |\
| `default_visibility` | `boolean` | Whether this group should be visible by default. |\
\
* * *\
\
#### `MapStyleLayerGroupCreationProps` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#mapstylelayergroupcreationprops)\
\
A set of properties required when specifying a MapStyle layer group.\
\
JavaScriptPython\
\
```javascript\
type MapStyleLayerGroupCreationProps = MapStyleLayerGroup & {\
filter: string\
};\
```\
\
```python\
class MapStyleLayerGroupCreationProps(MapStyleLayerGroup):\
filter: str\
```\
\
| Parent | Description |\
| --- | --- |\
| [`MapStyleLayerGroup`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#mapstylelayergroup) | A grouping concept for MapStyle layers, allowing for interaction on a set of layers. |\
\
##### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-74)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `filter` | `string` | Layer filtering regular expression that determines whether layer with a given id should be part of this group. Supports [regular JS RegExp syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp). |\
\
* * *\
\
#### `MouseEvent` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#mouseevent)\
\
Mouse event capturing information such as position and any map features related to it.\
\
JavaScriptPython\
\
```javascript\
type MouseEvent = {\
coordinate: [number, number],\
position: [number, number],\
pickInfo?: {\
layerId: string,\
rowIndex: number,\
rowData: unknown[]\
}\
};\
```\
\
```python\
class MouseEvent():\
coordinate: Tuple[Number, Number]\
position: Tuple[Number, Number]\
pick_info: Optional[PickInfo]\
```\
\
##### Javascript [Skip link to Javascript](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#javascript-28)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-75)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `coordinate` | \[`number`, `number`\] | Geospatial coordinates \[longitude, latitude\]. |\
| `position` | \[`number`, `number`\] | Mouse position relative to the viewport \[x, y\]. |\
| `pickInfo` | `object` | Additional context on map data associated with this event. |\
| `pickInfo.layerId` | `string` | Identifier of the layer that the mouse event is related to. |\
| `pickInfo.rowIndex` | `number` | Index of the row in the data table that picked layer visualizes. |\
| `pickInfo.rowData` | `unknown[]` | Row data that the picked layer visualizes. |\
\
##### Python [Skip link to Python](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#python-34)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-76)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `coordinate` | ```Tuple[``number```, ```number``]``` | Geospatial coordinates \[longitude, latitude\]. |\
| `position` | \[`number`, `number`\] | Mouse position relative to the viewport \[x, y\]. |\
| `pickInfo` | [`PickInfo`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#pickinfo) | Additional context on map data associated with this event. |\
\
* * *\
\
#### `OnClickHandlerType` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#onclickhandlertype)\
\
_Python-exclusive type._\
\
JavaScript\
\
```javascript\
OnClickHandlerType = Callable[([MouseEvent], None)];\
```\
\
* * *\
\
#### `OnGeometrySelectionType` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#ongeometryselectiontype)\
\
_Python-exclusive type._\
\
Python\
\
```python\
OnGeometrySelectionType = Callable[[GeometrySelectionEvent], None]\
```\
\
* * *\
\
#### `OnHoverHandlerType` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#onhoverhandlertype)\
\
_Python-exclusive type._\
\
Python\
\
```python\
OnHoverHandlerType = Callable[[MouseEvent], None]\
```\
\
* * *\
\
#### `OnViewUpdateType` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#onviewupdatetype)\
\
_Python-exclusive type._\
\
Python\
\
```python\
OnViewUpdateType = Callable[[View], None]\
```\
\
* * *\
\
#### `PickInfo` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#pickinfo)\
\
_Python-exclusive type._\
\
Additional context on map data associated to this event.\
\
Python\
\
```python\
class PickInfo():\
layer_id: str\
row_index: Number\
row_data: List[Any]\
```\
\
##### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-77)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `layer_id` | `string` | Identifier of the layer that the mouse event is related to. |\
| `row_index` | `number` | User facing MapStyle label. |\
| `row_data` | `List[Any]` | Row data that the picked layer visualizes. |\
\
* * *\
\
#### `RequestParameters` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#requestparameters)\
\
Allows [createMap](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#createmap) to transform any requests related to the base map (tiles, source, etc).\
\
JavaScript\
\
```javascript\
type RequestParameters = {\
url: string;\
headers?: {[header: string]: string};\
method?: 'GET' | 'POST' | 'PUT';\
```\
\
##### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-78)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `url` | `string` | The URL to be requested. |\
| `headers` | `{[header: string]: string};` | The headers to be sent with the request. |\
| `method` | `string` | Request method to use. `'GET'`, `'POST'`, or `'PUT'`. |\
\
* * *\
\
#### `SetMapConfigOptions` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#setmapconfigoptions)\
\
Options applicable when setting the map configuration.\
\
JavaScriptPython\
\
```javascript\
type SetMapConfigOptions = {\
additionalDatasets?: DatasetCreationProps[]\
};\
```\
\
```python\
class SetMapConfigOptions():\
additional_datasets: Optional[List[_DatasetCreationProps]]\
```\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `additionalDatasets` | [`DatasetCreationProps[]`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#datasetcreationprops) | Datasets to add to the map before loading the map configuration. |\
\
* * *\
\
#### `SetSplitModeOptions` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#setsplitmodeoptions)\
\
Options applicable when setting split map mode.\
\
JavaScript\
\
```javascript\
type SetSplitModeOptions: Partial<SplitModeContext>\
```\
\
| Parent | Description |\
| --- | --- |\
| [`SplitModeContext`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#splitmodecontext) | Base type that contains context around the split map mode. |\
\
* * *\
\
#### `SidePanelType` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#sidepaneltype)\
\
Available side panel types.\
\
JavaScript\
\
```javascript\
type SidePanelType = 'layer' | 'column' | 'filter' | 'interaction' | 'map' | 'analysis';\
```\
\
* * *\
\
#### `SplitMode` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#splitmode)\
\
Supported map split modes.\
\
JavaScriptPython\
\
```javascript\
type SplitMode = 'single' | 'dual' | 'swipe';\
```\
\
```python\
SplitMode = Literal["single", "dual", "swipe"]\
```\
\
* * *\
\
#### `SplitModeProps` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#splitmodeprops)\
\
Container type for split map mode options.\
\
JavaScriptPython\
\
```javascript\
type SplitModeProps={\
splitMode: SplitMode\
layers: Optional[SplitLayers]\
};\
```\
\
```python\
class SplitModeProps():\
split_mode: SplitMode\
layers: Optional[SplitLayers]\
```\
\
##### Javascript [Skip link to Javascript](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#javascript-29)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-79)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `splitMode` | [`SplitMode`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#splitmode) | Supported split map modes. |\
| `layers` | `string[][]` | Optional array of layer ids to show on either side of the split. Only applicable for dual and swipe split modes. |\
\
##### Python [Skip link to Python](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#python-35)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-80)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `split_mode` | [`SplitMode`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#splitmode) | Supported split map modes. |\
| `layers` | [`SplitLayers`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#splitlayers) | Optional array of layer ids to show on either side of the split. Only applicable for dual and swipe split modes. |\
\
* * *\
\
#### `SplitModeContext` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#splitmodecontext)\
\
Base type that contains context around the split map mode.\
\
JavaScript\
\
```javascript\
type SplitModeContext = {\
layers: string[][],\
isViewSynced: boolean,\
isZoomSynced: boolean\
};\
```\
\
##### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-81)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `layers` | `string[][]` | An array of layer ids to show on either side of the split. Only applicable for multi-view split modes. |\
| `isViewSynced` | `bool` | Boolean indicating whether views are synced. Only applicable to dual split mode. |\
| `isZoomSynced` | `bool` | Boolean indicating whether zoom is synced between views. Only applicable to dual split mode. |\
\
* * *\
\
#### `SplitModeDetails` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#splitmodedetails)\
\
Container type for split map mode details.\
\
JavaScript\
\
```javascript\
export type SplitModeDetails = {\
splitMode: SplitMode\
} & SplitModeContext;\
```\
\
##### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-82)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `splitMode` | [`SplitMode`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#splitmode) | Supported split map modes. |\
| `SplitModeContext` | [`SplitModeContext`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#splitmodecontext) | Base type that contains context around the split map mode. |\
\
* * *\
\
#### `SplitLayers` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#splitlayers)\
\
_Python-exclusive type._\
\
Arrays with layer Ids per each post-split map section.\
\
Python\
\
```python\
SplitLayers = List[List[str]]\
```\
\
* * *\
\
#### `StudioLoadingProps` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#studioloadingprops)\
\
Type that allows for studio application customization to be specified.\
\
JavaScript\
\
```javascript\
type StudioLoadingProps = {\
url: string,\
namespace?: string\
};\
```\
\
##### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-83)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `url` | `string` | The URL to load the studio application from. |\
| `namespace` | `string` | The name of the object attached to the window that contains createMap function. |\
\
* * *\
\
#### `SyncWidgetMap` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#syncwidgetmap)\
\
Initializes a new widget map.\
\
_Python-exclsuive type._\
\
Python\
\
```python\
class SyncWidgetMap(\
self,\
*,\
style: Optional[Dict] = None,\
basemaps: Optional[Dict] = None,\
raster: Optional[Dict] = None,\
studio: Optional[Dict] = None,\
)\
```\
\
##### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-84)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `style` | `Dict` | Optional map container CSS style customization. Uses camelCase as this is React standard. |\
| `basemaps` | `Dict` | Basemap customization settings. |\
| `basemaps.custom_map_styles` | `List[` [`MapStyleCreationProps`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#mapstylecreationprops)`]` | A set of properties required when specifying a map style. |\
| `basemaps.initial_map_styles` | `string` | A mapbox style ID. |\
| `raster` | `Dict` | Customization related to raster datasets and tiles. Not available when `renderer = html` |\
| `raster.server_urls` | `List[string]` | URLs to custom servers to target when serving raster tiles. |\
| `raster.stac_search_url` | `string` | URL to pass to the backend for searching a STAC Collection. |\
\
* * *\
\
#### `ThemeOptions` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#themeoptions)\
\
_Python-exclusive type._\
\
Python\
\
```python\
lass ThemeOptions():\
background_color: Optional[str]\
```\
\
##### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-85)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `background_color` | `string` | Background color of UI elements. |\
\
* * *\
\
#### `ThemePresets` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#themepresets)\
\
_Python-exclusive type._\
\
Python\
\
```python\
ThemePresets = Literal["light", "dark"]\
```\
\
* * *\
\
#### `ThemeUpdateProps` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#themeupdateprops)\
\
Map UI theme settings that support customization.\
\
JavaScriptPython\
\
```javascript\
type ThemeUpdateProps = {\
preset: 'light' | 'dark',\
options?: {\
backgroundColor?: CSSColor\
}\
};\
```\
\
```python\
class ThemeUpdateProps():\
preset: Optional[ThemePresets]\
options: Optional[ThemeOptions]\
```\
\
##### Javascript [Skip link to Javascript](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#javascript-30)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-86)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `preset` | `string` | UI theme preset name. |\
| `options` | `object` | Optional UI theme customization options. |\
| `options.backgroundColor` | `CSSColor` | Background color of UI elements in a CSS color string. |\
\
##### Python [Skip link to Python](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#python-36)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-87)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `preset` | [`ThemePresets`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#themepresets) | UI theme preset name. |\
| `options` | [`ThemeOptions`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#themeoptions) | Optional UI theme customization options. |\
\
* * *\
\
#### `View` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#view)\
\
Type encapsulating view properties.\
\
JavaScriptPython\
\
```javascript\
type View = {\
longitude: number,\
latitude: number,\
zoom: number,\
pitch: number,\
bearing: number,\
dragRotate: boolean\
};\
```\
\
```python\
class View(_PartialView):\
longitude: Number\
latitude: Number\
zoom: Number\
pitch: Number\
bearing: Number\
drag_rotate: StrictBool\
```\
\
##### Javascript [Skip link to Javascript](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#javascript-31)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-88)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `longitude` | `number` | Longitude of the view center \[-180, 180\]. |\
| `latitude` | `number` | Latitude of the view center \[-90, 90\]. |\
| `zoom` | `number` | View zoom level \[0-22\]. |\
| `pitch` | `number` | View pitch value \[0-90\]. |\
| `bearing` | `number` | View bearing. |\
| `bearing` | `number` | View bearing. |\
| `dragRotate` | `boolean` | Whether to enable rotating with pointer drag. |\
\
##### Python [Skip link to Python](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#python-37)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-89)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `longitude` | `number` | Longitude of the view center \[-180, 180\]. |\
| `latitude` | `number` | Latitude of the view center \[-90, 90\]. |\
| `zoom` | `number` | View zoom level \[0-22\]. |\
| `pitch` | `number` | View pitch value \[0-90\]. |\
| `bearing` | `number` | View bearing. |\
| `drag_rotate` | `boolean` | Whether to enable rotating with pointer drag. |\
\
* * *\
\
#### `ViewLimits` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#viewlimits)\
\
Type encapsulating map view limits.\
\
JavaScriptPython\
\
```javascript\
type ViewLimits = {\
minZoom: number,\
maxZoom: number,\
maxBounds?: Bounds\
};\
```\
\
```python\
class ViewLimits():\
min_zoom: Number\
max_zoom: Number\
max_bounds: Bounds\
```\
\
##### Javascript [Skip link to Javascript](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#javascript-32)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-90)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `minZoom` | `number` | Minimum allowed zoom level. |\
| `maxZoom` | `number` | Maximum allowed zoom level. |\
| `maxBounds` | [`Bounds`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#bounds) | Optional maximum allowed bounds. |\
\
##### Python [Skip link to Python](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#python-38)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-91)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `min_zoom` | `number` | Minimum allowed zoom level. |\
| `max_zoom` | `number` | Maximum allowed zoom level. |\
| `maxBounds` | [`Bounds`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#bounds) | Optional maximum allowed bounds. |\
\
* * *\
\
#### `ViewMode` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#viewmode)\
\
Supported map view modes.\
\
JavaScript\
\
```javascript\
type ViewMode = '2d' | '3d' | 'globe';\
```\
\
### Tooltip Types [Skip link to Tooltip Types](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#tooltip-types)\
\
* * *\
\
#### `TooltipInteractionConfig` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#tooltipinteractionconfig)\
\
Type encapsulating whole tooltip configuration.\
\
JavaScriptPython\
\
```javascript\
type TooltipInteractionConfig = {\
enabled: boolean,\
tooltipConfig: TooltipConfig\
};\
```\
\
```python\
class TooltipInteractionConfig():\
enabled: bool\
tooltip_config: TooltipConfig\
```\
\
##### Javascript [Skip link to Javascript](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#javascript-33)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-92)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `enabled` | `bool` | Is tooltip enabled on hover. |\
| `tooltipConfig` | [`TooltipConfig`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#tooltipconfig) | Detailed configuration of the tooltip. |\
\
##### Python [Skip link to Python](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#python-39)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-93)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `enabled` | `bool` | Is tooltip enabled on hover. |\
| `tooltip_config` | [`TooltipConfig`](https://docs.foursquare.com/developer/docs/studio-map-sdk-types#tooltipconfig) | Detailed configuration of the tooltip. |\
\
* * *\
\
#### `TooltipConfig` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#tooltipconfig)\
\
Type encapsulating detailed tooltip configuration.\
\
JavaScriptPython\
\
```javascript\
type TooltipConfig = {\
fieldsToShow: {\
[key: string]: [TooltipField]\
},\
compareMode?: Boolean,\
compareType?: 'absolute' | 'relative'\
};\
```\
\
```python\
class TooltipConfig():\
fields_to_show: Dict[str, List[TooltipField]]\
compare_mode: bool\
compare_type: "absolute" | "relative"\
```\
\
##### Javascript [Skip link to Javascript](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#javascript-34)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-94)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `fieldsToShow` | `{ [key: string]: [TooltipField] }` | Key value pairs where key is ID of dataset, and value is list of fields to show on Tooltip. |\
| `compareMode` | `Boolean` | Is compare mode enabled. |\
| `compareType` | `'absolute' | 'relative'` | Which compare type is active. |\
\
##### Python [Skip link to Python](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#python-40)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-95)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `fieldsToShow` | `{ [key: string]: [TooltipField] }` | Key value pairs where key is ID of dataset, and value is list of fields to show on Tooltip. |\
| `compareMode` | `Boolean` | Is compare mode enabled. |\
| `compareType` | `'absolute' | 'relative'` | Which compare type is active . |\
\
* * *\
\
#### `TooltipField` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#tooltipfield)\
\
Type describing an individual tooltip on the map.\
\
JavaScriptPython\
\
```javascript\
type TooltipField = {\
name: string,\
format: string\
};\
```\
\
```python\
class TooltipField():\
name: str\
format: str\
```\
\
##### Javascript [Skip link to Javascript](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#javascript-35)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-96)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `name` | `string` | Field name (name of column in the dataset). |\
| `format` | `string` | Format of text. |\
\
##### Python [Skip link to Python](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#python-41)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-97)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `name` | `str` | Field name (name of column in the dataset). |\
| `format` | `str` | Format of text. |\
\
* * *\
\
#### `TooltipInteractionResponse` [Skip link to [object Object]](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#tooltipinteractionresponse)\
\
Type defining the interaction status of tooltips on the map.\
\
JavaScriptPython\
\
```javascript\
type TooltipInteractionResponse = {\
enabled: Boolean\
};\
```\
\
```python\
class TooltipInteractionResponse():\
enabled: bool\
```\
\
##### Javascript [Skip link to Javascript](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#javascript-36)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-98)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `enabled` | `Boolean` | Whether or not the tooltip enabled on hover. |\
\
##### Python [Skip link to Python](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#python-42)\
\
###### Arguments [Skip link to Arguments](https://docs.foursquare.com/developer/docs/studio-map-sdk-types\#arguments-99)\
\
| Argument | Type | Description |\
| --- | --- | --- |\
| `enabled` | `bool` | Whether or not tooltip enabled on hover. |\
\
Updated5 months ago\
\
* * *\
\
Did this page help you?\
\
Yes\
\
No\
\
\
\
Ask AI\
\
reCAPTCHA\
\
Recaptcha requires verification.\
\
protected by **reCAPTCHA**