Setup Guide - Map SDK

To use Map SDK (since version 2.0), you'll need a Map SDK API Key. Map SDK uses this API Key to associate API requests with your account and provide additional control and security for your maps and SDK functionality. To learn how to create new API Keys, update their settings, delete them, and how to use them with Map SDK, see Authentication.

The rest of this page contains setup information for the Map SDK:

JavaScript Setup

npm

The Map SDK can be used with pure JavaScript code, or integrated with any JavaScript UI framework.

The Map SDK also provides native Typescript typings.

Installation

If your project is using a bundler, you can install @foursquare/map-sdk as a module:

# yarn
yarn add @foursquare/map-sdk
# npm
npm i @foursquare/map-sdk
# bun
bun add @foursquare/map-sdk

Or if you want to use it in plan JS and HTML, you can get the SDK directly from a CDN:

import { createMap } from "https://cdn.jsdelivr.net/npm/@foursquare/map-sdk@latest/dist/index.js";

Import

You can then import the things that you'll use like so:

import { createMap } from "@foursquare/map-sdk";

Python Setup

PyPI version

The Map SDK for Python enables the display of interactive Studio maps inside notebook environments. It also provides Python methods to control embedded maps, change map settings, add new data layers, and much more.

Installation

Install via pip:

$ pip install foursquare.map-sdk

Notebooks

Using a notebook environment may require additional installation steps.

Visit your notebook environment's documentation page to complete setup:

Import

You can import the things that you need like so:

from foursquare.map_sdk import create_map