Extensions
Describe an interactive tool and Felt AI builds it as a custom extension on your map, such as a panel that responds to clicks.
Available on the Business and Enterprise plans. Compare plans
Add an extension to give people interactive tools on your map, such as a panel that responds to clicks or a filter they draw. Describe what you want the extension to do, and Felt AI generates the code. Felt hosts the extension with the map.
Anyone viewing the map can use an extension, without a seat or extra access.
What a custom extension can do
A custom extension can do anything the JavaScript SDK supports on the map where it runs. For example, it can:
Respond when someone clicks a feature, draws a shape, or moves the map.
Read features and their attributes from the map's layers.
Show, hide, filter, and restyle layers.
Draw temporary lines, points, or areas, which aren't saved to the map's layers.
Add panels, buttons, dropdowns, and text inputs to the map.
Request data from other web services.
Felt has no built-in story maps, saved views, bookmarks, or tours, but a custom extension or the JavaScript SDK can build a story-map-like experience.
Custom extensions run in a sandbox: a web worker in the browser of each person viewing the map. Extension code has no window or document, can't access the surrounding page, and can't call the Felt REST API as that person. The REST API can't add extensions to a map.
You can load third-party JavaScript libraries, such as Turf for spatial calculations, from a URL with importScripts. Libraries that draw into the page, such as most charting and mapping libraries, don't work. Build panels and controls with the JavaScript SDK instead.
Anyone who can open the map can read the extension's code, including any API key in it. Use only keys that are meant to be public, such as a Mapbox public access token.
Examples
Neighborhood comparison
A panel compares two neighborhoods.

River animation
The Mississippi River network glows at a speed you set.

Commuter flows
Clicking a county draws lines to its commuters' destinations.

Create a custom extension with Felt AI
On the map, click Edit map.
In the toolbar, click Developer Platform > Custom extension. The Extension editor opens.
In the Felt AI tab, describe what the extension should do and press Enter. Felt AI writes the code.
Click Run. The Preview shows the map with the extension running.
Optional: Ask Felt AI for changes or edit the code yourself, then click Run again.
Optional: In the name field at the top of the code editor, enter a name.
Click Save. The extension appears in the Extensions section of the legend.
Example descriptions:
"When someone clicks a point, show a popup with the nearest 3 schools."
"Create a story map about the seven wonders of the world."
For more ways to phrase a request, see Prompting tips.
If the extension has errors, click the Felt AI tab, then Fix errors. The Console tab shows every log and error from the preview.

Where extensions run
Extensions run in view mode, including in embeds and on public maps. In edit mode, they're listed but inactive. Click Done to try one, or use the Extension editor's Preview.
Manage extensions
In edit mode, click an extension in the Extensions section of the legend to edit it, or drag it to change its position in the list. The ··· menu on an extension has Copy, Duplicate, and Delete. To reuse a custom extension on another map, click Copy, open the other map in edit mode, and press Cmd+V (Mac) or Ctrl+V (Windows).
Built-in map tools
Search, Measure, Table, and Compare are tools every map has, not extensions.
Last updated
Was this helpful?