LogoLogo
Sign upHelp CenterContactSocial
Home
Home
  • Overview
  • REST API
    • Getting started
    • Navigating maps and workspaces
    • Uploading files and URLs
    • Styling layers
    • Refreshing live data layers
    • Working with elements
    • Listening to updates using webhooks
    • API Reference
      • Authentication
      • Maps
      • Layers
      • Elements
      • Users
      • Comments
      • Embed Tokens
      • Sources
      • Projects
  • JS SDK
    • Getting started
    • General concepts
    • Controlling maps
    • Working with selection
    • Reading entities
    • Drawing elements
    • Working with layers
    • Layer filters
    • Building custom charts
    • Map interactions and viewport
    • Hiding and showing
    • Integrating with React
    • Sample application
    • Examples
    • API Reference
  • Felt Style Language
    • Getting started
    • Style definition blocks
      • The config block
      • The paint block
      • The label block
      • The legend block
      • The popup block
      • The attributes block
      • The filters block
    • Types of visualizations
      • Simple visualizations
      • Categorical visualizations
      • Numeric visualizations (color & size)
      • Heatmaps
      • Hillshade
    • Zoom-based Styling
      • Interpolators
    • Legends
    • Errors
    • Examples
Powered by GitBook
On this page
  • Installation
  • React

Was this helpful?

Export as PDF
  1. JS SDK

Getting started

PreviousProjectsNextGeneral concepts

Last updated 1 month ago

Was this helpful?

The Felt SDK allows you to embed, connect to and ultimately control Felt map embeds, enabling 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 . Reach out to .

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();

React

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

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

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

Enterprise plan
set up a trial
Controlling maps
Felt SDK React Starter Repo
Integrating with React