# Main

***

Use the [Felt](/js-sdk-api-reference/main/felt.md) object to embed a new iframe, or connect to an existing embedded\
iframe.

Once you have connected to a Felt map (either by embedding or connecting to an existing\
iframe), you can use the [FeltController](/js-sdk-api-reference/main/feltcontroller.md) object to control the map.

To see what you can do with the map, see the documentation for the [FeltController](/js-sdk-api-reference/main/feltcontroller.md)\
interface and its constituent controllers.

## Example

```typescript
// embed the map
const map = await Felt.embed(container, "felt-map-abc-123");

// now the map is loaded and connected, you can use the FeltController interface
// to control the map. For instance, to get information about the layers
const layers = await map.getLayers();

// Or to set the viewport to a specific location and zoom level
await map.setViewport({
  center: { latitude: 37.8113, longitude: -122.2682 },
  zoom: 10,
});
```

## Controller

* [FeltController](/js-sdk-api-reference/main/feltcontroller.md)

## Instantiation

* [FeltEmbedOptions](/js-sdk-api-reference/main/feltembedoptions.md)
* [Felt](/js-sdk-api-reference/main/felt.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.felt.com/js-sdk-api-reference/main.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
