Get Started

This page contains setup information for:

JavaScript Setup

npm versionnpm version

The Map SDK can be used with pure JavaScript code, or integrated with any JavaScript UI framework. To help you get started, we provide examples for how to integrate Unfolded maps into React, Angular, Vue.js applications, and we also show you how you can use the Map SDK in other JavaScript environments such as Observable.

Installation

If you are editing HTML directly, you can just load the Map SDK from CDN by adding a <script> element to your HTML:

<script src="https://unpkg.com/@unfolded/map-sdk/dist/unfolded-sdk.min.js"></script>

This makes the API available through the global variable UnfoldedMap.

Alternatively, you can download and import the @unfolded/map-sdk npm module if you are using a bundler such as webpack:

yarn add @unfolded/map-sdk
npm i @unfolded/map-sdk

Import

In your code, you will need to import the functions you want to use from the module. You can either import all functions into a single object:

import * as UnfoldedMapSDK from '@unfolded/map-sdk';

In which case you will be accessing the API functions via the UnfoldedMapSDK object:

UnfoldedMapSDK.createMap(...)

Or you can import individual functions:

import {UnfoldedMap, setViewState} from '@unfolded/map-sdk';

In this case you call the functions directly:

new UnfoldedMap(...)

Framework Examples

To see examples of the Map SDK in various frameworks (including Angular, React, Svelte, and Vue.js), visit the Framework Examples documentation page.

Python Setup

PyPI versionPyPI version

The Unfolded Map SDK for Python enables display of interactive Unfolded 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 unfolded.map-sdk

If you are using Jupyter Notebook 5.2 or earlier, enable the nbextension:

jupyter nbextension install --py --symlink --sys-prefix unfolded.map_sdk
jupyter nbextension enable --py --sys-prefix unfolded.map_sdk

Did this page help you?