Migration Guide

Foursquare released version 1 of the Studio Map SDK in the Fall of 2022. This version (and all subsequent versions) of the Map SDK offers an improved structure and a variety of new features for both Python and Javascript. All functions now accept a number of new types, providing a more consistent and stable development environment.


By the end of July 2023, we will no longer support older versions (<1.0) of the Map SDK. We highly recommended users upgrade as soon as possible.

To upgrade, use the following command in your terminal:

# yarn install
yarn add @unfolded/map-sdk@^1
# npm install
npm i @unfolded/map-sdk@^1
$ pip install unfolded.map-sdk --upgrade

Migration Matrix

This table details APIs not longer supported and their counterparts in v1.

v0 APIv1 APINotes
HTMLUnfoldedMapNo longer needed. See notes.The Map SDK now recognizes your environment and will automatically use an HTML renderer for non-interactive environments such as DataBricks. You can pass renderer = “html” in create_map()to force HTML rendering.
getMapUrl()Not available.Published maps are currently not supported in v1.0.
getTimelineInfo()getFilters(), getFilterById()Timeline info is now stored in FilterTimeline, which can be extracted from the TimeRangeFilter object.
onLoad()Not available.Published maps are currently not supported in v1.0.
refreshMapData()Not available.Published maps are currently not supported in v1.0.
setLayerVisibility()updateLayer()Setting a layer's visibility is an option in updateLayer().
setMapEventHandlers()Not available for Javascript. For Python, see set_event_handlers()In Javascript, event handlers can now be accessed and updated through the map object.

Added Functionality

In addition to complete type coverage across the SDK, the Map SDK now offers a number of new functions. Visit the API overview to see a full list of available endpoints.

New Dataset Functions

API FunctionDescription
addTileDataset()Adds a new tiled dataset to the map.
getDatasetById()Retrieves a dataset by its identifier.
getDatasetWithData()Retrieves a dataset record with its data for a given dataset.
getDatasets()Gets all datasets available on the map.
replaceDataset()Replaces a given dataset with a new one.
updateDataset()Updates an existing dataset with given values.

New Filter Functions

API FunctionDescription
addFilter()Adds a filter to the map.
getFilterById()Retrieves a filter by its identifier.
getFilters()Gets all the filters currently applied to the map.
removeFilter()Removes a filter from the map.
updateFilter()Updates an existing filter with given values.
updateTimeline()Updates a time range filter timeline with given values.

New Layer Functions

API FunctionDescription
getLayerById()Retrieves a layer by its identifier.
getLayerTimeline()Gets the current layer timeline configuration.
updateLayer()Updates an existing layer with given values.
updateLayerTimeline()Updates the current layer timeline configuration.

New Map Functions

API FunctionDescription
addToDOM()Adds a map into a container element provided as an argument. (Normally called in constructor.)
createMap()Create a new map instance.
getMapConfig()Gets the configuration representing the current map state.
getMapControlVisibility()Gets the map control visibility settings.
getMapStyles()Gets the currently available map styles.
getSplitMode()Gets the split mode of the map.
getView()Gets the current view state of the map.
getViewLimits()Gets the current view limits of the map.
setView()Sets the view state of the map.
setViewLimits()Sets the view limits of the map.

Having trouble? Reach out in the Studio Community Slack or contact us directly via email.