Migration Guide - Map SDK

Version 3.0

The bump from 2.x to 3.x only affects Python users.

Upgrading to 3.0

For Python

Note that most changes have no functional effect on your code. These changes improve typing and clarity.

Your type checker may point out certain issues that should be very easy and straightforward to upgrade, and to make that switch easy, we provide a complete set of changes below. To locate any of the new types and classes, just import them from the root (foursquare.map_sdk).

Removed the underscore prefix:

Flattened types:

Old type New type
Field Union[BasicField, TimestampField]
RasterTileLocalMetadata Union[RasterTileLocalItemMetadata, RasterTileLocalCollectionMetadata]
_DatasetCreationProps Union[LocalDatasetCreationProps, VectorTileDatasetCreationProps, RasterTileDatasetCreationProps]
_TileDatasetCreationProps Union[VectorTileDatasetRemoteCreationProps, RasterTileDatasetRemoteCreationProps]
Filter Union[RangeFilter, SelectFilter, TimeRangeFilter, MultiSelectFilter]
SplitMode Literal["single", "dual", "swipe"]
SetSplitModeOptions PartialSplitModeContext
ThemePresets Literal["light", "dark"]
ViewMode Literal["2d", "3d", "globe"]

New types:

Documentation now also has a new page for Python best practices.

The experimental submodule has been moved (to foursquare.map_sdk.api.layer) and is now accessible from the root (foursquare.map_sdk) directly, without having to import further submodules. To upgrade, switch any of your foursquare.map_sdk.api.experimental.* imports to foursquare.map_sdk.

For Javascript/Typescript:

Version 2.0

🚧

Deprecation notice:

We will be phasing out v1.x of the libraries in favor of the new ones, so we recommend you upgrade as soon as possible. There are no plans to make further updates to these older versions of the libraries. The final sunset will happen no earlier than September 30th, 2024. For any additional help, you can reach us via our Studio Community Slack channel.

Upgrading from 1.x to 2.x

For Python:

For Javascript/Typescript:

Updated 5 months ago