Getting started

The Felt SDK allows you to embed, connect to and ultimately control Felt map embeds, allowing you to build powerful, interactive custom applications around Felt.

You are able to control many aspects of the Felt UI and map contents, as well as being notified of events happening in the map such as clicks, selections, etc.

This feature is available to customers on the Enterprise plan. Reach out to our team to set up a trial.

Installation

Assuming you are using a modern JavaScript environment, install the SDK using your preferred package manager:

npm install @feltmaps/js-sdk

Create an HTML page with a container element:

<html>
  <body>
    <div id="container"></div>
  </body>
</html>

Embed a Felt map in your container element and use the SDK to control it:

import { Felt } from "@feltmaps/js-sdk";

const map = await Felt.embed(
  document.querySelector("#container"),
  "FELT_MAP_ID",
);
const layers = await map.getLayers();
const elements = await map.getElements();

For more information on how to control a map, see Controlling maps.

React

If you are building a React application, you can use the Felt SDK React Starter Repo to get started quickly.

You can also read our guide on Integrating with React to learn more about how to use the Felt SDK with React.

Last updated