Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 668 Bytes

README.md

File metadata and controls

34 lines (26 loc) · 668 Bytes

@feltmaps/js-sdk

An SDK for Felt maps.

Quickstart

Install the SDK using your preferred package manager:

npm install @feltmaps/js-sdk

Embed a Felt map in your app 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();
map.setViewport({
  center: {
    latitude: 37.8044,
    longitude: -122.271,
  },
  zoom: 13,
});