Map SDK

🚧

Under construction

This documentation refers to the Unfolded Map SDK v0.x. The newest version of the Map SDK is a complete reconstruction, and documentation is currently being developed for this domain. Documentation for the Map SDK v1.0 can be found on docs.unfolded.ai.

Installation

To get started with the Map SDK, visit the appropriate setup guide for your environment:

API Overview

The sections below contain an overview of Unfolded Map SDK organized by function.

Map Functions

The Map SDK provides functionality for configuring the visualization of maps, as well as embedding them int your web page.

API Function

Description

UnfoldedMap()

Embeds a map into your web page or Jupyter Notebook.

HTMLUnfoldedMap

Creates a static version of Unfolded Studio (for use in Databricks notebooks).

getMapUrl

Builds the full URL string from a Studio map id.

getMapConfig

Gets map configuration.

setMapConfig

Sets map configuration.

setViewState

Sets the map view on a certain location.

setSplitMode

Sets the map Split Mode between dual, swipe, or single mode.

setTheme

Sets the theme of Studio to dark or light.

setMapControlVisibility

Set the visibility for the specified map controls (legend etc).

Data Functions

The Map SDK provides a variety of data functions, allowing you to add, remove, and filter data from datasets.

API Function

Description

addDataset

Adds a dataset to the map.

removeDataset

Removes a dataset from the map.

refreshMapData

Reloads the data displayed on the map (used with live data).

setFilter

Set a filter value.

Layer Functions

The Map SDK provides a variety of layer functions, allowing you to add, remove, and configure the visibility of layers on your map.

API Function

Description

addLayer

Adds a new layer to the specified map.

getLayers

Returns a list of objects describing each layer in the specified map.

setLayerVisibility

Shows or hides a layer for the specified map.

removeLayer

Removes a layer from the specified map.

Timeline Functions

Animation is a core feature of Unfolded maps, and the Map SDK's timeline endpoints provide a full complement of functions to let applications control this feature.

API Function

Description

setTimelineConfig

Sets time filter timeline configuration.

setLayerTimelineConfig

Sets layer timeline configuration.

getTimelineInfo

Gets information object for the timeline filter.

getLayerTimelineInfo

Gets information object for the layer timeline control.

Event Operations

Applications can add interactivity by listening to events from Unfolded maps and implementing custom event handling functions.

API Function

Description

setMapEventHandlers

Sets event handlers for a map.

The following event handlers are provided by the Unfolded Map SDK:

Event

Event Handler

Description

LoadEvent

onLoad

Fires when the map loads.

ClickEvent

onClick

Fires when the user clicks on the map.

HoverEvent

onHover

Fires when the cursor is being hovered over the map.

GeometrySelectionEvent

onGeometrySelection

Fires when the user draws a polygon or rectangle.

FilterChangeEvent

onFilter

Fires when a map filter changes.

TimelineIntervalChangeEvent

onTimelineIntervalChange

Fires when the timeline interval changes.

LayerTimelineChangeEvent

onLayerTimelineTimeChange

Fires when the "current" time change events in the layer timeline.

API Reference

Visit the Map SDK's API Reference to view all functions, methods, and parameter specification


Did this page help you?