Only this pageAll pages
Powered by GitBook
Couldn't generate the PDF for 239 pages, generation stopped at 100.
Extend with 50 more pages.
1 of 100

JS SDK API Reference

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Basemaps


The Basemaps module allows you to control the map's basemap layer, such as getting the current basemap, listing available basemaps, changing the basemap, and being notified when the basemap changes.

Controller

  • BasemapsController

Interfaces

  • FeltBasemap

  • ColorBasemap

ColorBasemap


Properties

id

id: string

A unique identifier for the basemap.

Remarks

Do not rely on the stability of this ID for Felt basemaps, as they are subject to change.


name

name: string

The name of the basemap.


uiColorScheme

uiColorScheme: "light" | "dark"

The color scheme of the UI that goes with the basemap. It is best to set this to "light" if your basemap is broadly light, and "dark" if your basemap is broadly dark.


type: "color"


color: string


optional attribution: string

The attribution of the basemap, which is shown in the map's UI.

CustomTileBasemapInput


CustomTileBasemapInput: Omit<, "id">

ColorBasemapInput


ColorBasemapInput: Omit<, "id">

CustomTileBasemap


id: string

A unique identifier for the basemap.

Do not rely on the stability of this ID for Felt basemaps, as they are subject to change.


name: string

The name of the basemap.


uiColorScheme

FeltBasemap


id: string

A unique identifier for the basemap.

Do not rely on the stability of this ID for Felt basemaps, as they are subject to change.


name: string

The name of the basemap.


uiColorScheme

Basemap


Basemap: | |

type

color

attribution?

Type Aliases

CustomTileBasemap
ColorBasemapInput
CustomTileBasemapInput
Basemap
CustomTileBasemap
ColorBasemap
FeltBasemap
ColorBasemap
CustomTileBasemap
:
"light"
|
"dark"

The color scheme of the UI that goes with the basemap. It is best to set this to "light" if your basemap is broadly light, and "dark" if your basemap is broadly dark.


type: "xyz_tile"


tileUrl: string


optional attribution: string

The attribution of the basemap, which is shown in the map's UI.

Properties

id

Remarks

name

uiColorScheme

:
"light"
|
"dark"

The color scheme of the UI that goes with the basemap. It is best to set this to "light" if your basemap is broadly light, and "dark" if your basemap is broadly dark.


type: "felt"


theme: "color_light" | "monochrome_dark" | "monochrome_light" | "satellite"


optional attribution: string

The attribution of the basemap, which is shown in the map's UI.

Properties

id

Remarks

name

uiColorScheme

type

tileUrl

attribution?

type

theme

attribution?

LayerGroupChangeCallbackParams


The parameters for the `onLayerGroupChange` listener.

Properties

layerGroup

layerGroup: null | LayerGroup

@feltmaps/js-sdk

1.11.0

Minor Changes

  • 08e2b1c: Add rotation and contextMenu UI control options, for disabling map rotation and the right-click menu via Felt.embed and updateUiControls

  • dfe94af: Add raster statistics methods: getRasterAggregates, getRasterHistogramData and getRasterCategoryData, each summarizing one band of a raster layer over the whole raster, a bounding box, or a polygon, and getRasterProfile, which samples a band along a line. Raster bands now also carry an id to pass to those methods and a displayName.

  • 6ae7b35: Rename the band parameter to bandId across the raster statistics methods. getRasterAggregates, getRasterHistogramData and getRasterCategoryData no longer accept a line as their boundary, and the RasterGeometryFilter type is no longer exported.

  • b57ceb5: Make RasterLayerSource.encodedTileTemplateUrl nullable (string | null). TileService layers (WMS, WMTS, ArcGIS) serve pre-rendered image tiles and have no encoded tile URL.

  • c3b650b: Update layer visible docs

  • 6c0d014: Fix Felt.connect intermittently failing in Safari with DataCloneError by creating a fresh MessageChannel for each handshake attempt instead of re-transferring the same port

  • 03be185: Add basemaps API

  • 34b9ed3: Add feature actions

  • f7a1b4b: Add pageSize and select to getFeatures

  • 3d9527b: Add duplicateLayer method

  • 6e233c6: Fix feature action types and documentation

  • 7e4034f: Add support for legendDisplay on the layer

  • 336538b: Improve controller method documentation

  • 7b04db4: Update filter docs

  • f40a75c: Update getPrecomputedAggregates types

  • 4c4ebfd: Add UIIframeElement to custom ui panel

  • b87393f: Better docs, types and method consistency for Custom Panels API

  • aff926a: Return UIPanel on custom panel API methods

  • 58bd6dd: Add isDeterministicId to LayerFeature

  • 07b27c6: Export bundled controller types file for consumption as single file

  • 41e1612: Update getAggregates examples to be correct

  • 475c98e: Update getAggregates + MultiAggregationConfig docs

  • 160ca6d: Implement getFeatures method on LayersController

  • 6a1e536: Widen allowed boundary types

  • 56077be: Add setLayerBoundary, getLayerBoundaries, onLayerBoundaryChange

  • ac68984: Update getLayerSchema example

  • d327b46: Add afterCreation option in pin tool settings to control what happens after creating a Place

  • 6a66d40: Add updateLayer and expand createLayersFromGeoJson options

  • 6504fea: Change documentation for getElementGeoemtry to document Highlighter and Marker functionality, and allow holes in Highlighter geometry

  • 993fd44: Allow workers to be SDK clients

  • 417b8f4: Fixes incorrect value in documentation and updates links to other methods

  • 9620df9: Improve element docs

  • f0892c4: Improve documentation

  • 555a25a: Add clearSelection method

  • 1f5d950: Add option to pass auth token when embedding

  • 4bbde62: Allow setting a note to show with layer filters

  • 7badd4b: Add onMapIdle event

  • 41efd53: Add selectFeature method to select feature by layer and feature ID

  • 208c492: Add areaQuery param to getRenderedFeatures

  • 5f607ec: Return style with layers, and allow updating layer styles via setLayerStyle

  • 3a8bec8: Fix API reference link in README

  • Release v1 of Felt JS SDK

MapInteractionEvent


The event object passed to the interaction listeners.

Properties

coordinate

coordinate: LatLng

The cursor position in world coordinates.


point

point: { x: number; y: number; }

The pixel coordinates of the mouse cursor, relative to the map and measured from the top left corner.

Name
Type

features: []

The vector features that are under the cursor.


rasterValues: []

The raster pixel values that are under the cursor.

Elements


The Felt SDK lets you read, create and update elements on the map.

Elements that are created via the SDK are only available to the current session - they are not persisted to the map and not available to other users of the map.

If you want to let your users create elements (as opposed to using the SDK to create them programmatically), you can use the to select and configure the drawing tools in Felt.

f5ca219: Speed up initial Felt/SDK connection

  • 0b06e28: Add support for align and distribute items on grid container

  • bd1952f: Merge create and update panel methods and require using createPanelId

  • 27cc597: Add UIGridContainerElement to custom ui panel

  • f2fcd2a: Add checkbox, radio and toggle controls to custom ui panel

  • 15a35a5: Add method getPrecomputedAggregates

  • 6ce4a76: Rename UIPanel onClose to onClickClose

  • c16c55a: Support disabled on custom ui control option

  • 2688f9c: Add UIButtonRowElement to custom ui panel

  • 49d8895: Add Custom UI API for action triggers

  • 0754363: Add new variants, drop thin variants and add tint prop to UIButtonElement

  • 535e539: Include element id on every custom ui callback args

  • b848937: Add tool setting to hide/show inspector

  • 1e8e6f1: Return UIActionTrigger on custom action trigger API methods

  • 2b0f08f: Add Custom UI API for panels

  • f73dccf: Remove UIButtonGroupElement from custom ui panel

  • ea5c7ff: Run patch on prepare, not install

  • 4c83cfe: Don't try to patch packages not in dev mode

  • 2008356: Documentation improvements

  • 2fd720d: Use singular for custom ui types

  • a1c6322: Make custom panel API consistent with other methods

  • cf6711e: Make programmatic element CRUD types more accurate
  • 4c83c60: Add programmatic element creation, editing and deletion

  • 46e8ddc: Add onElementChange and onElementDelete

  • 3e87812: Adds APIs to use Felt's drawing tools on read-only maps

  • d877a83: Add getFeature for getting a single feature as GeoJSON with full detail geometry

  • 7f1d6aa: Add "interaction" to element schema

  • cf1dd7c: Improve Text and Note types and docs

  • 1f6a386: Add getViewportConstraints and setViewportConstraints methods definition

  • b059b70: Add onLayerFiltersChange to allow listening to changes to layer filters, be it ephemeral, style or widget filters that changed.

  • 19b41ce: Improve createLayer API

  • c20e605: Add setLayerLegendVisibility and setLayerGroupLegendVisibility methods definition

  • cbfd3fd: Reject promises when method handlers are invalid

  • 0915f48: Add showLayerDataTable and hideLayerDataTable methods

  • 9620df9: Change Circle.coordinates for Circle.center

  • 63c3042: Add getLayerSchema method

  • 69cc0a9: Fix spelling mistake in types

  • 87304d8: Fix geometry filter type

  • 1f22654: Add screen point to pointer events

  • b0e4149: Improves type readability and docs

  • 65bf269: Add createLayer and deleteLayer

  • 4bd0ae9: Add getMapDetails method definition

  • 5f903fb: Update Layer type and createLayerFromGeoJson to separate out Source concept

  • 597a8d6: Return coordinates on Circle and Place elements as they are only a single point.

  • f2f4289: Add layer stats methods

  • bb79037: Fix per-geometry styling for created layers

    Patch Changes

    1.10.2

    Patch Changes

    1.10.1

    Patch Changes

    1.10.0

    Minor Changes

    Patch Changes

    1.9.0

    Minor Changes

    1.8.0

    Minor Changes

    Patch Changes

    1.7.0

    Minor Changes

    Patch Changes

    1.6.0

    Minor Changes

    1.5.1

    Patch Changes

    1.5.0

    Minor Changes

    Patch Changes

    1.4.0

    Minor Changes

    1.3.0

    Minor Changes

    1.2.0

    Minor Changes

    1.1.0

    Minor Changes

    Patch Changes

    1.0.2

    Major Changes

    x

    number

    y

    number

    features

    rasterValues

    LayerFeature
    RasterValue
  • PathElementCreate

  • PolygonElementCreate

  • CircleElementCreate

  • MarkerElementCreate

  • HighlighterElementCreate

  • TextElementCreate

  • NoteElementCreate

  • ImageElementCreate

  • PlaceElementRead

  • PathElementRead

  • PolygonElementRead

  • CircleElementRead

  • MarkerElementRead

  • HighlighterElementRead

  • TextElementRead

  • NoteElementRead

  • ImageElementRead

  • LinkElementRead

  • PlaceElementUpdate

  • PathElementUpdate

  • PolygonElementUpdate

  • CircleElementUpdate

  • MarkerElementUpdate

  • HighlighterElementUpdate

  • TextElementUpdate

  • NoteElementUpdate

  • ImageElementUpdate

    • ElementCreate

    • ElementUpdate

    • ElementGroup

    • GetElementGroupsConstraint

    • ElementGroupChangeCallbackParams

    • GetElementsConstraint

    • ElementChangeCallbackParams

    • Element

    Controller

    Interfaces

    ToolsController
    ElementsController

    Type Aliases

    Element Groups

    Elements

    PlaceElementCreate

    CircleElementRead


    Properties

    id

    id: string

    The unique identifier for the element.


    groupId

    groupId: null | string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    color

    color: string

    The color of the element in some CSS-like format.


    name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    imageUrl: null | string

    The URL of an image that has been added to the element.


    strokeOpacity: number

    A value between 0 and 1 that describes the opacity of the element's stroke.


    strokeWidth: number

    The width of the element's stroke in pixels.


    strokeStyle: "solid" | "dashed" | "dotted"

    The style of the element's stroke.


    type: "Circle"


    radius: number

    The radius of the circle in meters.


    radiusMarker: boolean

    Whether to show a marker on the circle that indicates the radius


    radiusDisplayAngle: number

    The angle at which the control point for setting the radius is displayed, in degrees. When the radiusMarker is true, there is a dotted line rendered from the center of the circle to the control point, and the marker is shown at the midpoint of this line.


    radiusDisplayUnit: null | "meter" | "kilometer" | "foot" | "mile"

    The unit of the radius used when the radiusMarker is true.

    A value of null means that the unit matches the user's locale.


    fillOpacity: number

    The opacity of the circle's fill.


    center:

    The center of the circle.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.

    CircleElementCreate


    Properties

    type

    type: "Circle"


    radius

    radius: number

    The radius of the circle in meters.


    center

    center: LngLatTuple

    The center of the circle.


    groupId?

    optional groupId: null | string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    optional color: string

    The color of the element in some CSS-like format.


    optional name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    optional description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    optional attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.


    optional imageUrl: null | string

    The URL of an image that has been added to the element.


    optional strokeOpacity: number

    A value between 0 and 1 that describes the opacity of the element's stroke.


    optional strokeWidth: number

    The width of the element's stroke in pixels.


    optional strokeStyle: "solid" | "dashed" | "dotted"

    The style of the element's stroke.


    optional radiusMarker: boolean

    Whether to show a marker on the circle that indicates the radius


    optional radiusDisplayAngle: number

    The angle at which the control point for setting the radius is displayed, in degrees. When the radiusMarker is true, there is a dotted line rendered from the center of the circle to the control point, and the marker is shown at the midpoint of this line.


    optional radiusDisplayUnit: null | "meter" | "kilometer" | "foot" | "mile"

    The unit of the radius used when the radiusMarker is true.

    A value of null means that the unit matches the user's locale.


    optional fillOpacity: number

    The opacity of the circle's fill.

    Example

    Default

    name

    description

    attributes

    imageUrl

    strokeOpacity

    Default

    strokeWidth

    Default

    strokeStyle

    Default

    type

    radius

    radiusMarker

    Default

    radiusDisplayAngle

    Default

    radiusDisplayUnit

    Default

    fillOpacity

    Default

    center

    interaction?

    Default

    LngLatTuple

    color?

    Example

    Default

    name?

    description?

    attributes?

    interaction?

    Default

    imageUrl?

    strokeOpacity?

    Default

    strokeWidth?

    Default

    strokeStyle?

    Default

    radiusMarker?

    Default

    radiusDisplayAngle?

    Default

    radiusDisplayUnit?

    Default

    fillOpacity?

    Default

    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    1
    2
    "solid"
    false
    90
    null
    0.25
    "default"
    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    "default"
    1
    2
    "solid"
    false
    90
    null
    0.25

    GetElementGroupsConstraint


    The constraints to apply when getting element groups.

    optional ids: string[]

    The ids of the element groups to get.

    GetElementsConstraint


    The constraints to apply when getting elements.

    optional ids: string[]

    The ids of the elements to get.

    ElementCreate


    ElementCreate: | | | | | | | |

    Properties

    ids?

    Properties

    ids?

    PlaceElementCreate
    PathElementCreate
    PolygonElementCreate
    CircleElementCreate
    MarkerElementCreate
    HighlighterElementCreate
    ImageElementCreate
    TextElementCreate
    NoteElementCreate

    Element


    Element: PlaceElementRead | PathElementRead | PolygonElementRead | CircleElementRead | MarkerElementRead | HighlighterElementRead | TextElementRead | NoteElementRead | ImageElementRead | LinkElementRead

    ElementUpdate


    ElementUpdate: PlaceElementUpdate | PathElementUpdate | PolygonElementUpdate | CircleElementUpdate | MarkerElementUpdate | HighlighterElementUpdate | TextElementUpdate | NoteElementUpdate | ImageElementUpdate

    AggregationMethod


    AggregationMethod: "min" | "max" | "avg" | "sum" | "median"

    The method to use for the aggregation.

    FilterLogicGate


    FilterLogicGate: "and" | "or"

    GeometryFilter


    GeometryFilter: FeltBoundary | PolygonGeometry | MultiPolygonGeometry | LngLatTuple[]

    The common type for filtering data by a spatial boundary.

    This can be either:

    • FeltBoundary: a [w, s, e, n] bounding box

    • PolygonGeometry: a GeoJSON Polygon geometry

    • MultiPolygonGeometry: a GeoJSON MultiPolygon geometry

    • LngLatTuple[]: a list of coordinates describing a single ring of a polygon

    FilterExpression


    FilterExpression: [null | string, "in" | "ni", null | (null | string | number | boolean)[]] | [null | string, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", null | string | number | boolean]

    GetRasterProfileResult


    The response from the LayersController.getRasterProfile method.

    Properties

    samples

    samples: RasterProfileSample[]

    The samples, ordered from the line's start.

    GridType


    GridType: "h3"

    The type of grid to use for precomputed aggregate values.

    BasemapsController


    The basemaps controller allows you to manage the map's basemap layer.

    You can get the current basemap, list available basemaps, change the basemap, and be notified when the basemap changes.

    Extended by

    • FeltController

    Methods

    getCurrentBasemap()

    getCurrentBasemap(): Promise<Basemap>

    Gets the currently active basemap.

    Use this method to retrieve information about the current basemap, including its type (Felt, color, or custom tile), name, color scheme, and attribution.

    Returns

    Promise<>

    A promise that resolves to the current basemap configuration.


    getBasemaps(): Promise<[]>

    Gets all basemaps available on the map.

    Use this method to retrieve a list of all available basemaps that can be applied to the map.

    Promise<[]>

    A promise that resolves to all basemaps available on the map.


    chooseBasemap(id: string): void

    Chooses the basemap to use for the map.

    Use this method to change the current basemap. The basemap ID can be obtained from getBasemaps().

    Parameter
    Type

    void

    A promise that resolves when the basemap has been set.


    addCustomBasemap(args: { basemap: | ; select: boolean; }): Promise<>

    Adds a custom basemap to the map. This can be either a solid color or a basemap from a custom tile URL.

    Parameter
    Type
    Description

    Promise<>

    A promise for the added basemap.


    removeBasemap(id: string): Promise<void>

    Removes a basemap from the list of available basemaps.

    Parameter
    Type

    Promise<void>

    A promise that resolves when the basemap has been removed.

    onBasemapChange(args: { handler: (basemap: ) => void; }): VoidFunction

    Adds a listener for when the basemap changes.

    Use this to react to basemap changes, such as updating your UI or adjusting other map elements to match the new basemap's color scheme.

    Parameter
    Type

    VoidFunction

    A function to unsubscribe from the listener.

    ImageElementRead


    Properties

    id

    id: string

    The unique identifier for the element.


    groupId

    groupId: null | string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    name

    name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    type: "Image"


    imageUrl: string

    The URL of the image that is rendered in this element


    opacity: number

    The opacity of the image, between 0 and 1.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.

    ImageElementCreate


    Properties

    type

    type: "Image"


    coordinates

    coordinates: [number, number][][] = MultiLineStringGeometrySchema.shape.coordinates


    imageUrl

    imageUrl: string

    The URL of the image that is rendered in this element


    optional groupId: null | string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    optional name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    optional description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    optional attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.


    optional opacity: number

    The opacity of the image, between 0 and 1.

    ImageElementUpdate


    Properties

    id

    id: string

    The unique identifier for the element.


    type

    type: "Image"


    groupId?

    optional groupId: null | string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    optional name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    optional description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    optional attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.


    optional coordinates: [number, number][][] = MultiLineStringGeometrySchema.shape.coordinates


    optional imageUrl: string

    The URL of the image that is rendered in this element


    optional opacity: number

    The opacity of the image, between 0 and 1.

    ElementGroup


    Properties

    id

    id: string

    A string identifying the element group.


    name

    name: string

    The name of the element group. This is shown in the legend.


    caption

    caption: null | string

    The caption of the element group. This is shown in the legend.


    elementIds: string[]

    The ids of the elements in the element group.

    You can use these ids to get the full element objects via the method.


    visible: boolean

    Whether the element group is visible or not.


    shownInLegend: boolean

    Whether the element group is shown in the legend or not.

    AggregatedGridConfig


    The grid configuration for an aggregated precomputed aggregate value. This requires an attribute property, because the numeric aggregation requires it.

    If you just want to count the features in each grid cell, use the CountGridConfig instead, where you are not required to specify an attribute.

    Used inside GetLayerPrecomputedCalculationParams.

    Properties

    resolution

    resolution: number

    The resolution of the grid to use for the precomputed calculation.


    attribute

    attribute: string

    The attribute to use for the precomputed calculation.

    This must be a numeric attribute;


    type: "h3"

    The type of grid to use for the precomputed calculation.


    method: "min" | "max" | "avg" | "sum"

    The method to use for the precomputed calculation.

    GetRasterHistogramParams


    The parameters for requesting a histogram of a raster band's values, passed to the method.

    layerId: string


    bandId: string

    The ID of the band to bin, read from the bands on a raster layer's source.


    ElementChangeCallbackParams


    The parameters for the and the listeners.

    element: null |

    The new data for the element or null if the element was removed.


    isBeingCreated: boolean

    Whether or not this element is still being created by a drawing tool.

    For example, if the user begins drawing a polygon, they need to place multiple points until they've ultimately completed the polygon. All the time they are still placing points, this will be true.

    Interactions


    The Interactions module allows you to be notified when the user interacts with the map.

    Interactions include clicking and hovering on points and features.

    LayerProcessingStatus


    LayerProcessingStatus: "processing" | "completed" | "failed" | "incomplete"

    This describes the processing status of a layer.

    The various values are:

    • processing

    GetLayerHistogramBin


    One bin from the response from the method.

    min: number

    The left edge of the bin.


    max: number

    The right edge of the bin.


    value

    AggregationConfig


    Defines how to aggregate a value across features in a layer.

    attribute: string

    The attribute to use for the aggregation. This must be a numeric attribute.


    method: "min" | "max" | "avg" | "sum" |

    GeoJsonDataVectorSource


    A GeoJSON data source is a layer that is populated from GeoJSON data, such as from a local file, or programmatically-created data.

    type: "geoJsonData"

    Identifies this as a GeoJSON data source.


    data: object

    The GeoJSON data for the layer.

    This must be a GeoJSON FeatureCollection.

    GetLayerCategoriesGroup


    A single category from the response from the method.

    key: string | number | boolean

    The category for which the value was calculated.


    value: null | number

    GetLayersConstraint


    The constraints to apply when getting layers.

    optional ids: string[]

    The ids of the layers to get.

    GetRasterProfileParams


    The parameters for sampling a raster band along a line, passed to the method.

    layerId: string


    bandId: string

    The ID of the band to sample, read from the bands on a raster layer's source.


    FeltTiledVectorSource


    FeltTiledVectorSource: { type: "felt"; tileTemplateUrl: string; }

    A tiled vector source is a layer that is populated from data the has been uploaded to Felt, and processed into vector tiles.

    type: "felt"

    Identifies this as a tiled vector source. Typically, these tiles will have been uploaded to and processed by Felt.

    GridConfig


    GridConfig: |

    Describes the type of grid to use for precomputed aggregate values.

    CountGridConfig


    The grid configuration for a count-based precomputed aggregate value. Compared to the , the attribute property is not required, because the count is the same regardless of the attribute.

    Used inside .

    resolution: number

    The resolution of the grid to use for the precomputed calculation.


    type: "h3"

    GetLayerPrecomputedCalculationParams


    The parameters for calculating a single aggregate value for a layer, passed to the method.

    layerId: string

    The ID of the layer to calculate an aggregate value for.


    gridConfig:

    The grid configuration to use for the precomputed calculation.


    optional

    GeoJsonUrlVectorSource


    A GeoJSON URL source is a layer that is populated from a GeoJSON file at a remote URL.

    These sources are ones that have not been uploaded to and processed by Felt, and as such their capabilities are limited.

    For instance, they cannot be filtered, nor can statistics be fetched for them.

    type: "geoJsonUrl"

    Identifies this as a GeoJSON URL source.


    url: string

    LayerBoundaries


    All the different sources for boundaries for a layer, including their combined result.

    spatialFilters: null |

    Boundaries set by drawing spatial filters on the map.

    When there are multiple spatial filters, they are combined into a multi-polygon.


    ephemeral: null |

    Boundaries that are set ephemerally by viewers in their own session.

    GeoJsonFileVectorSource


    A GeoJSON file source is a layer that is populated from a GeoJSON file on your local machine.

    This is an input-only type. It is converted to a when passed to .

    type: "geoJsonFile"

    Identifies this as a GeoJSON file source.


    file: File

    The GeoJSON file for the layer.

    GetLayerGroupsConstraint


    The constraints to apply when getting layer groups.

    optional ids: string[]

    The ids of the layer groups to get.

    Layer


    Layer: | |

    GetRasterHistogramResult


    The response from the method.

    bins: []

    The bins, in ascending order of value.

    GetRenderedFeaturesConstraint


    Constraints for the method. This can include layer constriants, spatial constraints, or both. If no constraints are provided, all rendered features will be returned.

    optional areaQuery: { coordinates: ; } | { boundary: [number, number, number, number]; }

    GetRasterCategoriesResult


    The response from the method.

    categories: []

    The categories, most frequent first.


    total: number

    How many distinct values the band holds within the scope, which is larger than the number of categories returned when limit drops some.

    GetRasterCategoriesParams


    The parameters for counting the distinct values of a raster band, passed to the method.

    layerId: string


    bandId: string

    The ID of the band to count values for, read from the bands on a raster layer's source.


    LayerSchema


    The schema that describes the structure of the features in a layer.

    This can be useful to build generic UIs that need to know the structure of the data in a layer, such as a dropdown to choose an attribute.

    featureCount: number

    The total number of features in the layer.


    attributes: []

    Array of attribute schemas describing the properties available on features in this layer.

    LayerSchemaCommonAttribute


    The common schema for all attributes.

    id: string

    The unique identifier for this attribute.

    This can be used to fetch statistics, categories, histograms etc. for this attribute via the , , and methods.


    displayName: string

    The human-readable name of this attribute.


    LayerSchemaAttribute


    LayerSchemaAttribute: | | | |

    A single attribute from the layer schema.

    Each feature in a layer has a set of attributes, and these types describe the structure of a single attribute, including things like id, display name, type, and sample values.

    LayerChangeCallbackParams


    The parameters for the listener.

    layer: null |

    The new data for the layer or null if the layer was removed.

    : The layer has been uploaded or updated and is still processing.
  • completed: The layer has been processed and can be viewed on the map.

  • failed: The layer failed to process and cannot be viewed on the map.

  • incomplete: The layer has not been processed.

  • type

    method

    "median"

    The method to use for the aggregation.

    Properties

    attribute

    method

    Properties

    type

    data

    Properties

    ids?

    tileTemplateUrl: string

    The template URL used for fetching tiles.

    Type declaration

    type

    tileTemplateUrl

    Properties

    ids?

    elementIds

    Remarks

    visible

    shownInLegend

    `getElements`

    For elements that require text entry (such as Places, Text and Notes) this will be true all the time the user is typing text until the point at which the user finishes, by pressing Escape for example.

    If the user is editing an existing element, this will be false.

    For elements that are created programmatically, this will be false.

    Properties

    element

    isBeingCreated

    `onElementChange`
    `onElementCreate`
    Element

    Controller

    Interfaces

    InteractionsController
    MapInteractionEvent
    :
    number

    The number of features in the bin.

    Properties

    min

    max

    value

    LayersController.getHistogramData
    The value calculated for the category, whether a count, sum, average, etc.

    null is returned if there are no features in the category as opposed to zero, so as not to confuse with a real zero value from some aggregation.

    Properties

    key

    value

    LayersController.getCategoryData
    boundary: LineStringGeometry | MultiLineStringGeometry

    The line to sample the band along. The band is sampled at roughly one sample per pixel along the line's length.

    Properties

    layerId

    bandId

    boundary

    LayersController.getRasterProfile
    CountGridConfig
    AggregatedGridConfig

    Properties

    type

    file

    GeoJsonDataVectorSource
    LayersController.createLayersFromGeoJson
    RasterLayer
    VectorLayer
    DataOnlyLayer

    Properties

    bins

    LayersController.getRasterHistogramData
    RasterHistogramBin

    Properties

    categories

    total

    LayersController.getRasterCategoryData
    RasterCategory

    Remarks

    Properties

    featureCount

    attributes

    LayerSchemaAttribute

    Remarks

    LayerSchemaNumericAttribute
    LayerSchemaTextAttribute
    LayerSchemaBooleanAttribute
    LayerSchemaDateAttribute
    LayerSchemaDateTimeAttribute

    Properties

    layer

    `onLayerChange`
    Layer
    steps: number[] | { type: "equal-intervals"; count: number; }

    How to divide the band's values into bins, either as a number of equal intervals or as the bin edges themselves.


    optional boundary: GeometryFilter

    The spatial boundary for the pixels to include. Omit this to cover the whole raster.


    optional filters: Filters

    Filters on band values for the pixels to include.

    Properties

    layerId

    bandId

    steps

    LayersController.getRasterHistogramData

    boundary?

    filters?

    The type of grid to use for the precomputed calculation.

    method: "count"

    The method to use for the precomputed calculation, which in this case is always "count".

    Properties

    resolution

    type

    AggregatedGridConfig
    GetLayerPrecomputedCalculationParams

    method

    The remote URL of the GeoJSON file used to populate the layer.

    optional refreshInterval: null | number

    The interval in milliseconds between automatic refreshes of the GeoJSON.

    The value must be in the range of 250ms - 5 minutes (300,000ms).

    If the value is null, the GeoJSON will not be refreshed automatically.

    Properties

    type

    url

    refreshInterval?

    These are the filters that are set when the LayersController.setLayerBoundary method is called. There is no way to set these in the Felt UI - they can only be set using the SDK.

    combined: null | MultiPolygonGeometry

    The combined result of all the boundaries set on the layer.

    Each different source of boundary is intersected to produce the combined result.

    Properties

    spatialFilters

    ephemeral

    MultiPolygonGeometry
    GeometryFilter

    combined

    The area to query for rendered features. This can be specific coordinates or a FeltBoundary. If omitted, the entire viewport will be queried.

    optional layerIds: string[]

    The ids of the layers to get rendered features for.

    Properties

    areaQuery?

    `getRenderedFeatures`
    LatLng

    layerIds?

    optional boundary: GeometryFilter

    The spatial boundary for the pixels to include. Omit this to cover the whole raster.


    optional filters: Filters

    Filters on band values for the pixels to include.


    optional limit: number

    The maximum number of categories to return. The most frequent categories are kept.

    Properties

    layerId

    bandId

    boundary?

    LayersController.getRasterCategoryData

    filters?

    limit?

    detailedType: string

    The specific data type of this attribute, providing more detail than the basic type.

    For instance, a numeric attribute might be "INTEGER", "FLOAT, etc.


    distinctCount: number

    The number of distinct values present for this attribute across all features.

    Properties

    id

    displayName

    LayersController.getCategoryData
    LayersController.getHistogramData
    LayersController.getAggregates

    detailedType

    distinctCount

    filters
    :

    Attribute filters for the features to include when calculating the aggregate value.


    optional boundary: GeometryFilter

    The spatial boundary for the features to include when calculating the aggregate value.

    Properties

    layerId

    gridConfig

    filters?

    LayersController.getPrecomputedAggregates
    GridConfig

    boundary?

    Filters

    args.select?

    boolean

    Whether to select the basemap after adding it.

    id

    string

    args

    { basemap: ColorBasemapInput | CustomTileBasemapInput; select: boolean; }

    -

    args.basemap

    ColorBasemapInput | CustomTileBasemapInput

    id

    string

    args

    { handler: (basemap: Basemap) => void; }

    args.handler

    (basemap: Basemap) => void

    Example

    getBasemaps()

    Returns

    Example

    chooseBasemap()

    Parameters

    Returns

    Example

    addCustomBasemap()

    Parameters

    Returns

    Example

    removeBasemap()

    Parameters

    Returns

    Events

    onBasemapChange()

    Parameters

    Returns

    Example

    Basemap
    Basemap
    Basemap
    ColorBasemapInput
    CustomTileBasemapInput
    Basemap
    Basemap
    Basemap

    The basemap to add.

    description

    attributes

    type

    imageUrl

    opacity

    Default

    interaction?

    Default

    groupId?

    name?

    description?

    attributes?

    interaction?

    Default

    opacity?

    Default

    name?

    description?

    attributes?

    interaction?

    Default

    coordinates?

    imageUrl?

    opacity?

    Default

    FilterTernary


    FilterTernary: [FilterTernary | FilterExpression | null | boolean, FilterLogicGate, FilterTernary | FilterExpression | null | boolean]

    A FilterTernary is a tree structure for combining expressions with logical operators.

    When combining three or more conditions, you must use proper nesting rather than a flat list.

    Example

    // Get current basemap
    const basemap = await felt.getCurrentBasemap();
    console.log({
      name: basemap.name,
      type: basemap.type,
      uiColorScheme: basemap.uiColorScheme,
    });
    // Get all available basemaps
    const basemaps = await felt.getBasemaps();
    const lightBasemaps = basemaps.filter(b => b.uiColorScheme === "light");
    // Switch to a specific basemap
    const basemaps = await felt.getBasemaps();
    const darkBasemap = basemaps.find(b => b.uiColorScheme === "dark");
    if (darkBasemap) {
      await felt.chooseBasemap(darkBasemap.id);
    }
    // Add a custom basemap and select it
    await felt.addCustomBasemap({
      basemap: {
        type: "xyz_tile",
        tileUrl: "https://example.com/tile.png"
      },
      select: true,
    });
    // Listen for basemap changes
    const unsubscribe = felt.onBasemapChange({
      handler: basemap => {
        console.log(`Switched to ${basemap.name}`);
        updateUIColors(basemap.uiColorScheme);
      },
    });
    
    // later on...
    unsubscribe();
    1
    "default"
    "default"
    1
    "default"
    1
    // A simple filter with a single condition
    const filter = [
      ["AREA", "gt", 30_000],
      "and",
      ["COLOR", "eq", "red"]
    ]
    
    // A complex filter with multiple conditions
    const filter = [
      ["AREA", "gt", 30_000],
      "and",
      [
        ["COLOR", "eq", "red"],
        "or",
        ["TYPE", "eq", "residential"]
      ]
    ]

    NoteElementUpdate


    Properties

    id

    id: string

    The unique identifier for the element.


    type

    type: "Note"


    groupId?

    optional groupId: null | string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    optional color: string

    The color of the element in some CSS-like format.


    optional description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    optional attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.


    optional rotation: number

    The rotation of the element in degrees.


    optional scale: number

    The relative scale of the element from the default size. This is combined with the zoom to determine the actual size of the element.


    optional zoom: number

    The zoom level at which the element was created. This is combined with the scale to determine the actual size of the element.

    When creating an element, if you don't supply this value it defaults to the current zoom of the map when you call createElement.


    optional text: string

    The text in the element.


    optional align: "center" | "left" | "right"

    The alignment of the text, either left, center or right.


    optional style: "light" | "italic" | "regular" | "caps"

    The style of the text, either italic, light, regular or caps.


    optional widthScale: number


    optional position:

    The geographical position of the center of the note element.

    GetRasterAggregatesResult


    The response from the LayersController.getRasterAggregates method.

    Type Parameters

    Type Parameter

    T extends

    Properties

    stats

    stats: Record<T, null | number>

    The value calculated for each requested statistic.

    null is returned when the boundary and filters selected no pixels, as opposed to zero, so as not to confuse an empty selection with a real zero.


    optional percentiles: []

    The requested percentiles, in the order they were requested. Present only when percentile ranks were requested.

    LinkElementRead


    Properties

    id

    id: string

    The unique identifier for the element.


    groupId

    groupId: null | string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    color

    color: string

    The color of the element in some CSS-like format.


    name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    type: "Link"


    url: string

    The URL of the link that is rendered in this element.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.

    GetLayerCategoriesParams


    The parameters for getting categories from a layer, passed to the LayersController.getCategoryData method.

    Properties

    layerId

    layerId: string

    The ID of the layer to get categories from.


    attribute

    attribute: string

    The attribute to use for categorization.


    limit?

    optional limit: number

    The maximum number of categories to return.


    optional filters:

    Attribute filters for the features to include when calculating the categories.


    optional boundary:

    The spatial boundary for the features to include when calculating the categories.


    optional values:

    Configuration for filtering and aggregating values while preserving the full set of categories in the results.

    This is particularly useful when you want to compare different subsets of data while maintaining consistent categories. For example:

    • Show all building types in a city, but only count recent buildings in each type

    • Keep all neighborhood categories but only sum up residential square footage

    Unlike top-level filters which affect both what categories appear AND their values, filters in this configuration only affect the values while keeping all possible categories in the results.

    GetRasterAggregatesParams


    The parameters for calculating statistics for a raster band, passed to the LayersController.getRasterAggregates method.

    Type Parameters

    Type Parameter

    T extends

    Properties

    layerId

    layerId: string


    bandId

    bandId: string

    The ID of the band to calculate statistics for, read from the bands on a raster layer's source.


    aggregation: { methods: T[]; percentiles: number[]; }

    Which statistics to calculate for the band.

    Name
    Type
    Description

    optional boundary:

    The spatial boundary for the pixels to include. Omit this to cover the whole raster.


    optional filters:

    Filters on band values for the pixels to include, such as ["band:1", "gt", 100].

    GetLayerCalculationParams


    The parameters for calculating a single aggregate value for a layer, passed to the LayersController.getAggregates method.

    Type Parameters

    Type Parameter

    T extends | "count"

    Properties

    layerId

    layerId: string

    The ID of the layer to calculate an aggregate value for.


    aggregation: <T>

    Specifies how to aggregate values within each category or bin. When omitted, features are counted. When specified, the chosen calculation (avg, sum, etc.) is performed on the specified attribute.


    optional filters:

    Attribute filters for the features to include when calculating the aggregate value.


    optional boundary:

    The spatial boundary for the features to include when calculating the aggregate value.

    LayerSchemaBooleanAttribute


    The schema for a boolean attribute on a layer.

    Properties

    id

    id: string

    The unique identifier for this attribute.

    This can be used to fetch statistics, categories, histograms etc. for this attribute via the LayersController.getCategoryData, LayersController.getHistogramData, and LayersController.getAggregates methods.


    displayName

    displayName: string

    The human-readable name of this attribute.


    detailedType: string

    The specific data type of this attribute, providing more detail than the basic type.

    For instance, a numeric attribute might be "INTEGER", "FLOAT, etc.


    distinctCount: number

    The number of distinct values present for this attribute across all features.


    type: "boolean"

    Indicates this is a boolean attribute.


    sampleValues: { value: boolean; count: number; }[]

    A representative sample of boolean values for this attribute and their frequency.

    Name
    Type

    LayerSchemaDateAttribute


    The schema for a date attribute on a layer.

    Properties

    id

    id: string

    The unique identifier for this attribute.

    This can be used to fetch statistics, categories, histograms etc. for this attribute via the LayersController.getCategoryData, LayersController.getHistogramData, and LayersController.getAggregates methods.


    displayName

    displayName: string

    The human-readable name of this attribute.


    detailedType: string

    The specific data type of this attribute, providing more detail than the basic type.

    For instance, a numeric attribute might be "INTEGER", "FLOAT, etc.


    distinctCount: number

    The number of distinct values present for this attribute across all features.


    type: "date"

    Indicates this is a date attribute.


    min: string

    The earliest date present for this attribute in truncated ISO8601 format (YYYY-MM-DD).


    max: string

    The latest date present for this attribute in truncated ISO8601 format (YYYY-MM-DD).


    sampleValues: { value: string; count: number; }[]

    A representative sample of date values for this attribute and their frequency.

    Name
    Type

    LayerFilters


    The filters that are currently set on a layer.

    A layer's filters are the combination of various different places in which filters can be applied.

    Properties

    style

    style: Filters

    Filters that are set in the layer's style. These are the lowest level of filters, and can only be set by editing the map.


    components

    components: Filters

    Filters that are set in the layer's components, which are interactive elements in the legend. These can be set by viewers for their own session, but their default value can be set by the map creator.


    ephemeral

    ephemeral:

    Filters that are set ephemerally by viewers in their own session.

    These are the filters that are set when the method is called. There is no way to set these in the Felt UI - they can only be set using the SDK.


    combined:

    The combined result of all the filters set on the layer.

    CircleElementUpdate


    id: string

    The unique identifier for the element.


    type: "Circle"


    optional groupId: null |

    MarkerElementRead


    id: string

    The unique identifier for the element.


    groupId: null | string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    HighlighterElementCreate


    type: "Highlighter"


    coordinates: [][][]

    A multipolygon describing the area that is highlighted.

    If renderHoles is set to false, only the outer ring of each polygon will be rendered, filling in the area inside the highlighted region.


    optional

    MarkerElementCreate


    type: "Marker"


    coordinates: [][]


    optional groupId: null | string

    HighlighterElementUpdate


    id: string

    The unique identifier for the element.


    type: "Highlighter"


    optional groupId: null |

    HighlighterElementRead


    id: string

    The unique identifier for the element.


    groupId: null | string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    MarkerElementUpdate


    id: string

    The unique identifier for the element.


    type: "Marker"


    optional groupId: null |

    PathElementRead


    id: string

    The unique identifier for the element.


    groupId: null | string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    PlaceElementRead


    id: string

    The unique identifier for the element.


    groupId: null | string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    CreateLayersFromGeoJsonParams


    The parameters for the method.

    name: string

    The name of the layer to create.


    source: | |

    The source of the GeoJSON data.


    optional

    DataOnlyLayer


    A data-only layer doesn't have any geometry, but can be used to join with other layers

    id: string

    A string identifying the layer


    groupId: null | string

    The ID of the layer group that the layer belongs to.

    Layers that appear at the root level in Felt will not have a group ID.

    value

    boolean

    count

    number

    detailedType

    distinctCount

    type

    sampleValues

    value

    string

    count

    number

    detailedType

    distinctCount

    type

    min

    max

    sampleValues

    filters?

    boundary?

    values?

    Filters
    GeometryFilter
    ValueConfiguration

    combined

    Filters
    `setLayerFilters`
    Filters

    percentiles?

    RasterPercentile
    RasterAggregationMethod

    aggregation

    filters?

    boundary?

    MultiAggregationConfig
    Filters
    GeometryFilter
    AggregationMethod

    methods

    T[]

    The statistics to calculate for the band.

    percentiles?

    number[]

    aggregation

    boundary?

    filters?

    GeometryFilter
    Filters
    RasterAggregationMethod

    Percentile ranks between 0 and 100 to calculate, such as [10, 50, 90].


    name: string

    The name of the layer can be displayed in the Legend, depending on how the layer's legend is configured in its style.


    caption: null | string

    The layer's caption is shown in the legend.


    description: null | string

    The layer description forms part of the layer's metadata. This is visible to users via the layer info button in the legend.


    visible: boolean

    Whether the layer is visible or not.

    If a layer belongs to a layer group the group's visibility takes precedence.


    shownInLegend: boolean

    Whether the layer is shown in the legend or not.


    legendDisplay: "default" | "nameOnly"

    The display mode for the layer's legend.

    See LegendDisplay for more details.


    style: object

    The FSL style for the layer.

    See the FSL documentation for details on how to read and write styles.

    As the types of the styles are very complex, we return object here and advise that you program defensively while reading the styles.


    status: "processing" | "completed" | "failed" | "incomplete"

    The current processing status of the layer.


    geometryType: null

    Indicates that this layer has no geometry.


    bounds: null

    This is always null for data-only layers.

    Properties

    id

    groupId

    name

    caption

    description

    visible

    shownInLegend

    legendDisplay

    style

    status

    geometryType

    bounds

    color?

    Example

    Default

    description?

    attributes?

    interaction?

    Default

    rotation?

    Default

    scale?

    Default

    zoom?

    text?

    align?

    Default

    style?

    Default

    widthScale?

    position?

    LngLatTuple

    Example

    Default

    name

    description

    attributes

    type

    url

    interaction?

    Default

    string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    optional color: string

    The color of the element in some CSS-like format.


    optional name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    optional description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    optional attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.


    optional imageUrl: null | string

    The URL of an image that has been added to the element.


    optional strokeOpacity: number

    A value between 0 and 1 that describes the opacity of the element's stroke.


    optional strokeWidth: number

    The width of the element's stroke in pixels.


    optional strokeStyle: "solid" | "dashed" | "dotted"

    The style of the element's stroke.


    optional radius: number

    The radius of the circle in meters.


    optional radiusMarker: boolean

    Whether to show a marker on the circle that indicates the radius


    optional radiusDisplayAngle: number

    The angle at which the control point for setting the radius is displayed, in degrees. When the radiusMarker is true, there is a dotted line rendered from the center of the circle to the control point, and the marker is shown at the midpoint of this line.


    optional radiusDisplayUnit: null | "meter" | "kilometer" | "foot" | "mile"

    The unit of the radius used when the radiusMarker is true.

    A value of null means that the unit matches the user's locale.


    optional fillOpacity: number

    The opacity of the circle's fill.


    optional center: LngLatTuple

    The center of the circle.

    Properties

    id

    type

    groupId?

    color?

    Example

    Default

    name?

    description?

    attributes?

    interaction?

    Default

    imageUrl?

    strokeOpacity?

    Default

    strokeWidth?

    Default

    strokeStyle?

    Default

    radius?

    radiusMarker?

    Default

    radiusDisplayAngle?

    Default

    radiusDisplayUnit?

    Default

    fillOpacity?

    Default

    center?

    color
    :
    string

    The color of the element in some CSS-like format.


    name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    type: "Marker"


    opacity: number

    The opacity of the marker, between 0 and 1.


    size: number

    The size of the marker, used in conjunction with the zoom to determine the actual size of the marker.


    zoom: number

    The zoom level at which the marker was created. This is combined with the size to determine the actual size of the marker.

    When creating a marker, if you don't supply this value it defaults to the current zoom of the map when you call createElement.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.

    Properties

    id

    groupId

    color

    Example

    Default

    name

    description

    attributes

    type

    opacity

    Default

    size

    Default

    zoom

    interaction?

    Default

    groupId
    :
    null
    |
    string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    optional color: string

    The color of the element in some CSS-like format.


    optional name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    optional description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    optional attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.


    optional renderHoles: boolean

    Whether to render the holes of the highlighted area.


    optional opacity: number

    The opacity of the highlighter, between 0 and 1.

    Properties

    type

    coordinates

    groupId?

    LngLatTuple

    color?

    Example

    Default

    name?

    description?

    attributes?

    interaction?

    Default

    renderHoles?

    Default

    opacity?

    Default

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.

    optional color: string

    The color of the element in some CSS-like format.


    optional name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    optional description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    optional attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.


    optional opacity: number

    The opacity of the marker, between 0 and 1.


    optional size: number

    The size of the marker, used in conjunction with the zoom to determine the actual size of the marker.


    optional zoom: number

    The zoom level at which the marker was created. This is combined with the size to determine the actual size of the marker.

    When creating a marker, if you don't supply this value it defaults to the current zoom of the map when you call createElement.

    Properties

    type

    coordinates

    groupId?

    LngLatTuple

    color?

    Example

    Default

    name?

    description?

    attributes?

    interaction?

    Default

    opacity?

    Default

    size?

    Default

    zoom?

    string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    optional color: string

    The color of the element in some CSS-like format.


    optional name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    optional description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    optional attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.


    optional renderHoles: boolean

    Whether to render the holes of the highlighted area.


    optional opacity: number

    The opacity of the highlighter, between 0 and 1.


    optional coordinates: LngLatTuple[][][]

    A multipolygon describing the area that is highlighted.

    If renderHoles is set to false, only the outer ring of each polygon will be rendered, filling in the area inside the highlighted region.

    Properties

    id

    type

    groupId?

    color?

    Example

    Default

    name?

    description?

    attributes?

    interaction?

    Default

    renderHoles?

    Default

    opacity?

    Default

    coordinates?

    color
    :
    string

    The color of the element in some CSS-like format.


    name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    type: "Highlighter"


    renderHoles: boolean

    Whether to render the holes of the highlighted area.


    opacity: number

    The opacity of the highlighter, between 0 and 1.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.

    Properties

    id

    groupId

    color

    Example

    Default

    name

    description

    attributes

    type

    renderHoles

    Default

    opacity

    Default

    interaction?

    Default

    string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    optional color: string

    The color of the element in some CSS-like format.


    optional name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    optional description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    optional attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.


    optional opacity: number

    The opacity of the marker, between 0 and 1.


    optional size: number

    The size of the marker, used in conjunction with the zoom to determine the actual size of the marker.


    optional zoom: number

    The zoom level at which the marker was created. This is combined with the size to determine the actual size of the marker.

    When creating a marker, if you don't supply this value it defaults to the current zoom of the map when you call createElement.


    optional coordinates: LngLatTuple[][]

    Properties

    id

    type

    groupId?

    color?

    Example

    Default

    name?

    description?

    attributes?

    interaction?

    Default

    opacity?

    Default

    size?

    Default

    zoom?

    coordinates?

    color
    :
    string

    The color of the element in some CSS-like format.


    name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    imageUrl: null | string

    The URL of an image that has been added to the element.


    strokeOpacity: number

    A value between 0 and 1 that describes the opacity of the element's stroke.


    strokeWidth: number

    The width of the element's stroke in pixels.


    strokeStyle: "solid" | "dashed" | "dotted"

    The style of the element's stroke.


    type: "Path"


    distanceMarker: boolean

    Whether a distance marker is shown at the midpoint of the path.


    routingMode: null | "driving" | "cycling" | "walking" | "flying"

    Whether this represents a route, and if so, what mode of transport is used.

    If this is null, the path is not considered to be a route, so while it can have a distanceMarker, it will does not have a start or end cap.


    endCaps: boolean

    Whether or not to show Start and End caps on the path. This is only available if the routingMode is set.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.

    Properties

    id

    groupId

    color

    Example

    Default

    name

    description

    attributes

    imageUrl

    strokeOpacity

    Default

    strokeWidth

    Default

    strokeStyle

    Default

    type

    distanceMarker

    Default

    routingMode

    Default

    endCaps

    Default

    interaction?

    Default

    color
    :
    string

    The color of the element in some CSS-like format.


    name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    imageUrl: null | string

    The URL of an image that has been added to the element.


    type: "Place"


    symbol: string

    The symbol that is rendered for the Place.

    This can be an emoji by using colon-enclosed characters (e.g. ":smiley:") or one of the symbols available in Felt's symbol library.

    You can see the available symbols in the Felt UI when editing a Place by hovering a symbol and converting the tooltip to kebab-case. For example, the "Oil barrel" symbol is oil-barrel.


    frame: null | "frame-circle" | "frame-square"

    The frame that is rendered around the Place's symbol. This is only available for non-emoji symbols.


    hideLabel: boolean

    Whether the element's label is hidden on the map. This allows you to add a name to the element and can show in popups, but not have it visible on the map.

    This will also hide the faint placeholder label that is shown when an editable Place is selected.


    coordinates: LngLatTuple


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.

    Properties

    id

    groupId

    color

    Example

    Default

    name

    description

    attributes

    imageUrl

    type

    symbol

    frame

    hideLabel

    Default

    coordinates

    interaction?

    Default

    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    "default"
    0
    1
    "center"
    "regular"
    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    "default"
    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    "default"
    1
    2
    "solid"
    false
    90
    null
    0.25
    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    1
    10
    "default"
    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    "default"
    false
    0.5
    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    "default"
    1
    10
    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    "default"
    false
    0.5
    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    false
    0.5
    "default"
    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    "default"
    1
    10
    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    1
    2
    "solid"
    false
    null
    false
    "default"
    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    false
    "default"
    bounds
    : [
    number
    ,
    number
    ,
    number
    ,
    number
    ]

    Sets the bounds of the layer.


    optional caption: string

    Sets the caption of the layer.


    optional description: string

    Sets the description of the layer.


    optional geometryStyles: { Point: object; Line: object; Polygon: object; }

    The styles to apply to each geometry on the layer.

    Each style should be a valid FSL style, as described in Layer.style.

    These are optional, and if missing will use a default style determined by Felt, which you can consider to be undefined behaviour.

    Name
    Type

    Point?

    object

    Line?

    object

    Polygon?

    Properties

    name

    source

    bounds?

    LayersController.createLayersFromGeoJson
    GeoJsonUrlVectorSource
    GeoJsonDataVectorSource
    GeoJsonFileVectorSource
    const layer = await layersController.createLayersFromGeoJson({
      name: "My Layer",
      geometryStyles: {
        Point: {
          paint: { color: "red", size: 8 },
        },
        Line: {
          paint: { color: "blue", size: 4 },
          config: { labelAttribute: ["name"] },
          label: { minZoom: 0 },
        },
        Polygon: {
          paint: { color: "green", strokeColor: "darkgreen" },
        },
      },
    });

    caption?

    description?

    geometryStyles?

    Example

    TextElementRead


    Properties

    id

    id: string

    The unique identifier for the element.


    groupId

    groupId: null | string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    color

    color: string

    The color of the element in some CSS-like format.


    description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    rotation: number

    The rotation of the element in degrees.


    scale: number

    The relative scale of the element from the default size. This is combined with the zoom to determine the actual size of the element.


    zoom: number

    The zoom level at which the element was created. This is combined with the scale to determine the actual size of the element.

    When creating an element, if you don't supply this value it defaults to the current zoom of the map when you call createElement.


    text: string

    The text in the element.


    align: "center" | "left" | "right"

    The alignment of the text, either left, center or right.


    style: "light" | "italic" | "regular" | "caps"

    The style of the text, either italic, light, regular or caps.


    name: string

    The text shown in the element, which is identical to the text property.

    This is added for consistency with other elements that have a name property.


    type: "Text"


    position:

    The geographical position of the center of the text element.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.

    NoteElementRead


    Properties

    id

    id: string

    The unique identifier for the element.


    groupId

    groupId: null | string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    color

    color: string

    The color of the element in some CSS-like format.


    description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    rotation: number

    The rotation of the element in degrees.


    scale: number

    The relative scale of the element from the default size. This is combined with the zoom to determine the actual size of the element.


    zoom: number

    The zoom level at which the element was created. This is combined with the scale to determine the actual size of the element.

    When creating an element, if you don't supply this value it defaults to the current zoom of the map when you call createElement.


    text: string

    The text in the element.


    align: "center" | "left" | "right"

    The alignment of the text, either left, center or right.


    style: "light" | "italic" | "regular" | "caps"

    The style of the text, either italic, light, regular or caps.


    name: string

    The text shown in the element, which is identical to the text property.

    This is added for consistency with other elements that have a name property.


    type: "Note"


    widthScale: number


    position:

    The geographical position of the center of the note element.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.

    NoteElementCreate


    Properties

    type

    type: "Note"


    text

    text: string


    groupId?

    optional groupId: null | string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    optional color: string

    The color of the element in some CSS-like format.


    optional description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    optional attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.


    optional rotation: number

    The rotation of the element in degrees.


    optional scale: number

    The relative scale of the element from the default size. This is combined with the zoom to determine the actual size of the element.


    optional zoom: number

    The zoom level at which the element was created. This is combined with the scale to determine the actual size of the element.

    When creating an element, if you don't supply this value it defaults to the current zoom of the map when you call createElement.


    optional align: "center" | "left" | "right"

    The alignment of the text, either left, center or right.


    optional style: "light" | "italic" | "regular" | "caps"

    The style of the text, either italic, light, regular or caps.


    optional widthScale: number


    optional position:

    The geographical position of the center of the note element.

    If this is omitted, the note will be placed at the center of the current viewport.

    PolygonElementRead


    Properties

    id

    id: string

    The unique identifier for the element.


    groupId

    groupId: null | string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    color

    color: string

    The color of the element in some CSS-like format.


    name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    imageUrl: null | string

    The URL of an image that has been added to the element.


    strokeOpacity: number

    A value between 0 and 1 that describes the opacity of the element's stroke.


    strokeWidth: number

    The width of the element's stroke in pixels.


    strokeStyle: "solid" | "dashed" | "dotted"

    The style of the element's stroke.


    type: "Polygon"


    fillOpacity: number

    The opacity of the polygon's fill, between 0 and 1.


    areaMarker: boolean

    Whether to show an area marker on the polygon.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.

    PolygonElementUpdate


    Properties

    id

    id: string

    The unique identifier for the element.


    type

    type: "Polygon"


    groupId?

    optional groupId: null | string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    optional color: string

    The color of the element in some CSS-like format.


    optional name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    optional description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    optional attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.


    optional imageUrl: null | string

    The URL of an image that has been added to the element.


    optional strokeOpacity: number

    A value between 0 and 1 that describes the opacity of the element's stroke.


    optional strokeWidth: number

    The width of the element's stroke in pixels.


    optional strokeStyle: "solid" | "dashed" | "dotted"

    The style of the element's stroke.


    optional fillOpacity: number

    The opacity of the polygon's fill, between 0 and 1.


    optional areaMarker: boolean

    Whether to show an area marker on the polygon.


    optional coordinates: [][]

    GetLayerHistogramParams


    The params used to request a histogram of values from a layer, passed to the LayersController.getHistogramData method.

    Properties

    layerId

    layerId: string


    attribute

    attribute: string


    steps

    steps: number[] | { type: "equal-intervals"; count: number; } | { type: "time-interval"; interval: "hour" | "day" | "week" | "month" | "year"; }


    optional values: { boundary: [number, number][] | [number, number, number, number] | { type: "Polygon"; coordinates: [number

    Configuration for filtering and aggregating values while preserving the full set of bin ranges in the results.

    This is particularly useful when you want to compare different subsets of data while maintaining consistent ranges. For example:

    • Use the same height ranges for comparing old vs new buildings

    Unlike top-level filters which affect both what ranges appear AND their values, filters in this configuration only affect the values while keeping all possible ranges in the results.

    Name
    Type
    Default value
    Description

    optional filters:

    Attribute filters for the features to include when calculating the histogram bins.


    optional boundary:

    The spatial boundary for the features to include when calculating the histogram bins.

    InteractionsController


    The Interactions controller allows you to observe interactions with the map

    Extended by

    • FeltController

    Events

    onPointerClick()

    onPointerClick(params: { handler: (event: MapInteractionEvent) => void; }): VoidFunction

    Allows you to be notified when the user clicks on the map.

    Use this to react to user clicks on the map, such as triggering custom actions or collecting interaction data.

    Parameter
    Type

    VoidFunction

    A function to unsubscribe from the listener.


    onPointerMove(params: { handler: (event: ) => void; }): VoidFunction

    Allows you to be notified when the user moves the mouse over the map.

    Use this to track mouse movement and detect features under the cursor, such as for hover effects or real-time data display.

    Parameter
    Type
    Description

    VoidFunction

    A function to unsubscribe from the listener.

    PlaceElementUpdate


    Properties

    id

    id: string

    The unique identifier for the element.


    type

    type: "Place"


    groupId?

    optional groupId: null | string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    optional color: string

    The color of the element in some CSS-like format.


    optional name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    optional description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    optional attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.


    optional imageUrl: null | string

    The URL of an image that has been added to the element.


    optional symbol: string

    The symbol that is rendered for the Place.

    This can be an emoji by using colon-enclosed characters (e.g. ":smiley:") or one of the symbols available in Felt's symbol library.

    You can see the available symbols in the Felt UI when editing a Place by hovering a symbol and converting the tooltip to kebab-case. For example, the "Oil barrel" symbol is oil-barrel.


    optional frame: null | "frame-circle" | "frame-square"

    The frame that is rendered around the Place's symbol. This is only available for non-emoji symbols.


    optional hideLabel: boolean

    Whether the element's label is hidden on the map. This allows you to add a name to the element and can show in popups, but not have it visible on the map.

    This will also hide the faint placeholder label that is shown when an editable Place is selected.


    optional coordinates:

    LayerFeature


    A LayerFeature is a single geographical item in a layer.

    It is intended to be a lightweight object that contains the properties of a feature, but not the geometry. It is returned by methods like FeltController.getRenderedFeatures and FeltController.getFeature, and as part of the methods in the SelectionController

    The geometry can be obtained via the FeltController.getGeoJsonFeature method, which returns a GeoJsonFeature object.

    Properties

    id

    id: string | number

    The identifier of the feature, unique within the layer.


    isDeterministicId

    isDeterministicId: boolean

    Whether the id is deterministic.

    If the id is deterministic, it means that the id can be used to reference the feature in the layer and therefore in all the SDK feature-related methods.

    When the id is not deterministic, the feature cannot be referenced on SDK methods like or .

    For layers created and processed on Felt servers, the feature IDs are deterministic because Felt ensures every feature is correctly identified in vector tiles. This cannot be guaranteed for layers created using a GeoJSON source on the SDK (see ) where the ID will only be deterministic if GeoJSON features have an id property.


    layerId: string

    The identifier of the layer that the feature belongs to.


    geometryType: "Polygon" | "MultiPolygon" | "LineString" | "MultiLineString" | "Point" | "MultiPoint" | string & {}

    The type of geometry of the feature.

    Because LayerFeatures can be read from tiled features, it's possible that this geometryType won't match the geometry.type of the returned by .

    For example, this may return LineString but the full feature is a MultiLineString, or, similarly Polygon here may be a MultiPolygon in the full feature.

    As a result, you should treat this property as being indicative only.


    bbox: undefined | [number, number, number, number]

    The bounding box of the feature.

    Because LayerFeatures can be read from tiled features and considering that feature geometry can go through multiple tiles, it's possible that this is not the complete bounding box of the feature.


    properties:

    The properties of the feature, as a bag of attributes.

    API Reference

    To get started:

    import { Felt } from "@feltmaps/js-sdk";
    
    const felt = await Felt.embed(
      document.querySelector("#container"),
      "FELT_MAP_ID",
      {
        uiControls: {
          cooperativeGestures: false,
          fullScreenButton: false,
          showLegend: false,
        },
      }
    );
    const layers = await map.getLayers();

    View FeltController for a complete list of available functions. FeltEmbedOptions enumerates initialization options.

    Documents

    • CHANGELOG

    Modules

    • Basemaps

    PathElementUpdate


    id: string

    The unique identifier for the element.


    type: "Path"


    optional groupId: null |

    PlaceElementCreate


    type: "Place"


    coordinates:


    optional groupId: null | string

    PolygonElementCreate


    type: "Polygon"


    coordinates: [][]


    optional groupId: null | string

    TextElementCreate


    type: "Text"


    text: string


    optional groupId: null | string

    TextElementUpdate


    id: string

    The unique identifier for the element.


    type: "Text"


    optional groupId: null |

    Filters


    Filters: | | null | boolean

    Filters can be used to change which features in a layer are rendered. Filters can be applied to a layer by the method on the Felt controller.

    Filters use a tree structure for combining expressions with logical operators, called a . When combining three or more conditions, you must use proper nesting rather than a flat list.

    See the examples below for the correct structure to use when building complex filters.

    The possible operators are:

    object

    Remarks

    layerId

    geometryType

    Remarks

    bbox

    Remarks

    properties

    FeltController.getFeature
    SelectionController.selectFeature
    LayersController.createLayersFromGeoJson
    GeoJsonFeature
    FeltController.getGeoJsonFeature
    GeoJsonProperties
    Elements
    Interactions
    Layers
    Main
    Misc
    Selection
    Shared
    Tools
    UI
    Viewport

    ElementGroupChangeCallbackParams


    The parameters for the `onElementGroupChange` listener.

    Properties

    elementGroup

    elementGroup: null | ElementGroup

    Example

    Default

    description

    attributes

    rotation

    Default

    scale

    Default

    zoom

    text

    align

    Default

    style

    Default

    name

    Remarks

    type

    position

    interaction?

    Default

    LngLatTuple

    Example

    Default

    description

    attributes

    rotation

    Default

    scale

    Default

    zoom

    text

    align

    Default

    style

    Default

    name

    Remarks

    type

    widthScale

    position

    interaction?

    Default

    LngLatTuple

    color?

    Example

    Default

    description?

    attributes?

    interaction?

    Default

    rotation?

    Default

    scale?

    Default

    zoom?

    align?

    Default

    style?

    Default

    widthScale?

    position?

    LngLatTuple

    Example

    Default

    name

    description

    attributes

    imageUrl

    strokeOpacity

    Default

    strokeWidth

    Default

    strokeStyle

    Default

    type

    fillOpacity

    Default

    areaMarker

    Default

    interaction?

    Default

    color?

    Example

    Default

    name?

    description?

    attributes?

    interaction?

    Default

    imageUrl?

    strokeOpacity?

    Default

    strokeWidth?

    Default

    strokeStyle?

    Default

    fillOpacity?

    Default

    areaMarker?

    Default

    coordinates?

    LngLatTuple

    params

    { handler: (event: MapInteractionEvent) => void; }

    params.handler

    (event: MapInteractionEvent) => void

    params

    { handler: (event: MapInteractionEvent) => void; }

    Params for the listener

    params.handler

    (event: MapInteractionEvent) => void

    Parameters

    Returns

    Example

    onPointerMove()

    Parameters

    Returns

    Example

    MapInteractionEvent

    The handler function

    color?

    Example

    Default

    name?

    description?

    attributes?

    interaction?

    Default

    imageUrl?

    symbol?

    frame?

    hideLabel?

    Default

    coordinates?

    LngLatTuple
    string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    optional color: string

    The color of the element in some CSS-like format.


    optional name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    optional description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    optional attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.


    optional imageUrl: null | string

    The URL of an image that has been added to the element.


    optional strokeOpacity: number

    A value between 0 and 1 that describes the opacity of the element's stroke.


    optional strokeWidth: number

    The width of the element's stroke in pixels.


    optional strokeStyle: "solid" | "dashed" | "dotted"

    The style of the element's stroke.


    optional distanceMarker: boolean

    Whether a distance marker is shown at the midpoint of the path.


    optional routingMode: null | "driving" | "cycling" | "walking" | "flying"

    Whether this represents a route, and if so, what mode of transport is used.

    If this is null, the path is not considered to be a route, so while it can have a distanceMarker, it will does not have a start or end cap.


    optional endCaps: boolean

    Whether or not to show Start and End caps on the path. This is only available if the routingMode is set.


    optional coordinates: LngLatTuple[][]

    Properties

    id

    type

    groupId?

    color?

    Example

    Default

    name?

    description?

    attributes?

    interaction?

    Default

    imageUrl?

    strokeOpacity?

    Default

    strokeWidth?

    Default

    strokeStyle?

    Default

    distanceMarker?

    Default

    routingMode?

    Default

    endCaps?

    Default

    coordinates?

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.

    optional color: string

    The color of the element in some CSS-like format.


    optional name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    optional description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    optional attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.


    optional imageUrl: null | string

    The URL of an image that has been added to the element.


    optional symbol: string

    The symbol that is rendered for the Place.

    This can be an emoji by using colon-enclosed characters (e.g. ":smiley:") or one of the symbols available in Felt's symbol library.

    You can see the available symbols in the Felt UI when editing a Place by hovering a symbol and converting the tooltip to kebab-case. For example, the "Oil barrel" symbol is oil-barrel.


    optional frame: null | "frame-circle" | "frame-square"

    The frame that is rendered around the Place's symbol. This is only available for non-emoji symbols.


    optional hideLabel: boolean

    Whether the element's label is hidden on the map. This allows you to add a name to the element and can show in popups, but not have it visible on the map.

    This will also hide the faint placeholder label that is shown when an editable Place is selected.

    Properties

    type

    coordinates

    groupId?

    LngLatTuple

    color?

    Example

    Default

    name?

    description?

    attributes?

    interaction?

    Default

    imageUrl?

    symbol?

    frame?

    hideLabel?

    Default

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.

    optional color: string

    The color of the element in some CSS-like format.


    optional name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    optional description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    optional attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.


    optional imageUrl: null | string

    The URL of an image that has been added to the element.


    optional strokeOpacity: number

    A value between 0 and 1 that describes the opacity of the element's stroke.


    optional strokeWidth: number

    The width of the element's stroke in pixels.


    optional strokeStyle: "solid" | "dashed" | "dotted"

    The style of the element's stroke.


    optional fillOpacity: number

    The opacity of the polygon's fill, between 0 and 1.


    optional areaMarker: boolean

    Whether to show an area marker on the polygon.

    Properties

    type

    coordinates

    groupId?

    LngLatTuple

    color?

    Example

    Default

    name?

    description?

    attributes?

    interaction?

    Default

    imageUrl?

    strokeOpacity?

    Default

    strokeWidth?

    Default

    strokeStyle?

    Default

    fillOpacity?

    Default

    areaMarker?

    Default

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.

    optional color: string

    The color of the element in some CSS-like format.


    optional description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    optional attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.


    optional rotation: number

    The rotation of the element in degrees.


    optional scale: number

    The relative scale of the element from the default size. This is combined with the zoom to determine the actual size of the element.


    optional zoom: number

    The zoom level at which the element was created. This is combined with the scale to determine the actual size of the element.

    When creating an element, if you don't supply this value it defaults to the current zoom of the map when you call createElement.


    optional align: "center" | "left" | "right"

    The alignment of the text, either left, center or right.


    optional style: "light" | "italic" | "regular" | "caps"

    The style of the text, either italic, light, regular or caps.


    optional position: LngLatTuple

    The geographical position of the center of the text element.

    If this is omitted, the text will be placed at the center of the current viewport.

    Properties

    type

    text

    groupId?

    color?

    Example

    Default

    description?

    attributes?

    interaction?

    Default

    rotation?

    Default

    scale?

    Default

    zoom?

    align?

    Default

    style?

    Default

    position?

    string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    optional color: string

    The color of the element in some CSS-like format.


    optional description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    optional attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.


    optional rotation: number

    The rotation of the element in degrees.


    optional scale: number

    The relative scale of the element from the default size. This is combined with the zoom to determine the actual size of the element.


    optional zoom: number

    The zoom level at which the element was created. This is combined with the scale to determine the actual size of the element.

    When creating an element, if you don't supply this value it defaults to the current zoom of the map when you call createElement.


    optional text: string

    The text in the element.


    optional align: "center" | "left" | "right"

    The alignment of the text, either left, center or right.


    optional style: "light" | "italic" | "regular" | "caps"

    The style of the text, either italic, light, regular or caps.


    optional position: LngLatTuple

    The geographical position of the center of the text element.

    Properties

    id

    type

    groupId?

    color?

    Example

    Default

    description?

    attributes?

    interaction?

    Default

    rotation?

    Default

    scale?

    Default

    zoom?

    text?

    align?

    Default

    style?

    Default

    position?

    lt: Less than

  • gt: Greater than

  • le: Less than or equal to

  • ge: Greater than or equal to

  • eq: Equal to

  • ne: Not equal to

  • cn: Contains

  • nc: Does not contain

  • is: Is

  • isnt: Is not

  • in: In

  • ni: Not in

  • The allowed boolean operators are:

    • and: Logical AND

    • or: Logical OR

    Remarks

    FilterTernary
    FilterExpression
    setLayerFilters
    FilterTernary

    Example

    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    0
    1
    "center"
    "regular"
    "default"
    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    0
    1
    "center"
    "regular"
    "default"
    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    "default"
    0
    1
    "center"
    "regular"
    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    1
    2
    "solid"
    0.25
    false
    "default"
    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    "default"
    1
    2
    "solid"
    0.25
    false
    const unsubscribe = felt.onPointerClick({
      handler: (event) => console.log(event.center, event.features),
    });
    
    // later on...
    unsubscribe();
    // Track mouse movement and features under cursor
    const unsubscribe = felt.onPointerMove({
      handler: (event) => {
        console.log("Mouse position:", event.center);
        console.log("Features under cursor:", event.features);
      }
    });
    
    // later on...
    unsubscribe();
    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    "default"
    false
    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    "default"
    1
    2
    "solid"
    false
    null
    false
    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    "default"
    false
    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    "default"
    1
    2
    "solid"
    0.25
    false
    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    "default"
    0
    1
    "center"
    "regular"
    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    "default"
    0
    1
    "center"
    "regular"
    // 1. Simple filter: single condition
    felt.setLayerFilters({
      layerId: "layer-1",
      filters: ["AREA", "gt", 30_000],
    });
    
    // 2. Basic compound filter: two conditions with AND
    felt.setLayerFilters({
      layerId: "layer-1",
      filters: [
        ["AREA", "gt", 30_000],  // First condition
        "and",                   // Logic operator
        ["COLOR", "eq", "red"]   // Second condition
      ]
    });
    
    // 3. Complex filter: three or more conditions require nesting
    // ⚠️ IMPORTANT: Filters use a tree structure, not a flat list
    felt.setLayerFilters({
      layerId: "layer-1",
      filters: [
        ["AREA", "gt", 30_000],                // First condition
        "and",                                 // First logic operator
        [                                      // Nested group starts
          ["COLOR", "eq", "red"],              //   Second condition
          "and",                               //   Second logic operator
          ["TYPE", "eq", "residential"]        //   Third condition
        ]                                      // Nested group ends
      ]
    });
    
    // 4. Even more complex: four conditions with proper nesting
    // Visual structure:
    //          AND
    //         /   \
    //    condition  AND
    //              /   \
    //        condition  AND
    //                  /   \
    //            condition  condition
    felt.setLayerFilters({
      layerId: "layer-1",
      filters: [
        ["AREA", "gt", 30_000],                // First condition
        "and",
        [
          ["COLOR", "eq", "red"],              // Second condition
          "and",
          [
            ["TYPE", "eq", "residential"],     // Third condition
            "and",
            ["YEAR", "gt", 2000]               // Fourth condition
          ]
        ]
      ]
    });
    
    // 5. Mixed operators: combining AND and OR
    // Visual structure:
    //          AND
    //         /   \
    //    condition  OR
    //              /  \
    //        condition condition
    felt.setLayerFilters({
      layerId: "layer-1",
      filters: [
        ["AREA", "gt", 30_000],                // Must have large area
        "and",
        [
          ["COLOR", "eq", "red"],              // Must be either red
          "or",
          ["TYPE", "eq", "residential"]        // OR residential type
        ]
      ]
    });
    ,
    number
    ][][]; } | {
    type
    :
    "MultiPolygon"
    ;
    coordinates
    : [
    number
    ,
    number
    ][][][]; };
    filters
    :
    null
    |
    boolean
    | [
    null
    |
    string
    ,
    "in"
    |
    "ni"
    ,
    null
    | (
    null
    |
    string
    |
    number
    |
    boolean
    )[]] | [
    null
    |
    string
    ,
    "lt"
    |
    "gt"
    |
    "le"
    |
    "ge"
    |
    "eq"
    |
    "ne"
    |
    "cn"
    |
    "nc"
    |
    "is"
    |
    "isnt"
    ,
    null
    |
    string
    |
    number
    |
    boolean
    ] |
    ; aggregation: { method: "min" | "max" | "avg" | "sum" | "median"; attribute: string; }; }

    null | boolean | [null | string, "in" | "ni", null | (null | string | number | boolean)[]] | [null |

    -

    -

    aggregation?

    { method: "min" | "max" | "avg" | "sum" | "median"; attribute: string; }

    -

    -

    aggregation.method

    "min" | "max" | "avg" | "sum" | "median"

    AggregateMethodSchema

    The operation to use on the values from the features in the layer

    aggregation.attribute

    string

    -

    The attribute to use for the aggregation. This must be a numeric attribute.

    boundary?

    [number, number][] | [number, number, number, number] | { type: "Polygon"; coordinates: [number, number][][]; } | { type: "MultiPolygon"; coordinates: [number, number][][][]; }

    -

    -

    values?

    filters?

    boundary?

    Filters
    GeometryFilter

    filters?

    FilterTernary

    PathElementCreate


    Properties

    type

    type: "Path"


    coordinates

    coordinates: LngLatTuple[][]


    groupId?

    optional groupId: null | string

    The ID of the element group that the element belongs to. For elements that are not part of a group, this will be null.


    optional color: string

    The color of the element in some CSS-like format.


    optional name: null | string

    The element's name. For elements that can show a label or text on the map (e.g. a Place or Text element) this is the text that will be shown.

    For elements such as Polygons or Paths, the name is what is shown when the element is selected by clicking on it.


    optional description: null | string

    Text describing the element, which is shown in an element's popup when it is selected.

    Note that some elements are not selectable on the map, such as Notes, Text and Markers, so their description will not be shown.


    optional attributes: Record<string, unknown>

    A set of key-value pairs that can be used to store arbitrary data about the element.

    This is most useful for associating additional data with an element that is not part of the element's core data, such as a Place's address or some other data.


    optional interaction: "default" | "locked"

    Whether the element is interactive.

    The default interaction mode means that the element can be selected and edited by the user, if it was created by the SDK or by the user using a tool.

    If the interaction mode is locked, the element will not be editable by the user, which is often used for elements that you don't want the user to edit or move by accident.

    Elements that were created by the map author (i.e. not during an SDK "session") are not editable and have special behaviour depending on their name, description and attributes.


    optional imageUrl: null | string

    The URL of an image that has been added to the element.


    optional strokeOpacity: number

    A value between 0 and 1 that describes the opacity of the element's stroke.


    optional strokeWidth: number

    The width of the element's stroke in pixels.


    optional strokeStyle: "solid" | "dashed" | "dotted"

    The style of the element's stroke.


    optional distanceMarker: boolean

    Whether a distance marker is shown at the midpoint of the path.


    optional routingMode: null | "driving" | "cycling" | "walking" | "flying"

    Whether this represents a route, and if so, what mode of transport is used.

    If this is null, the path is not considered to be a route, so while it can have a distanceMarker, it will does not have a start or end cap.


    optional endCaps: boolean

    Whether or not to show Start and End caps on the path. This is only available if the routingMode is set.

    color?

    Example

    Default

    name?

    description?

    attributes?

    interaction?

    Default

    imageUrl?

    strokeOpacity?

    Default

    strokeWidth?

    Default

    strokeStyle?

    Default

    distanceMarker?

    Default

    routingMode?

    Default

    endCaps?

    Default

    "#ABC123";
    "rgb(255, 0, 0)";
    "hsl(200, 100%, 50%)";
    "#C93535"
    "default"
    1
    2
    "solid"
    false
    null
    false
    string
    ,
    "lt"
    |
    "gt"
    |
    "le"
    |
    "ge"
    |
    "eq"
    |
    "ne"
    |
    "cn"
    |
    "nc"
    |
    "is"
    |
    "isnt"
    ,
    null
    |
    string
    |
    number
    |
    boolean
    ] |
    FilterTernary

    LayerCommon


    The common properties for all layers.

    Properties

    id

    id: string

    A string identifying the layer


    groupId

    groupId: null | string

    The ID of the layer group that the layer belongs to.

    Layers that appear at the root level in Felt will not have a group ID.


    name: string

    The name of the layer can be displayed in the Legend, depending on how the layer's legend is configured in its style.


    caption: null | string

    The layer's caption is shown in the legend.


    description: null | string

    The layer description forms part of the layer's metadata. This is visible to users via the layer info button in the legend.


    visible: boolean

    Whether the layer is visible or not.

    If a layer belongs to a layer group the group's visibility takes precedence.


    shownInLegend: boolean

    Whether the layer is shown in the legend or not.


    legendDisplay: "default" | "nameOnly"

    The display mode for the layer's legend.

    See for more details.


    style: object

    The FSL style for the layer.

    See the for details on how to read and write styles.

    As the types of the styles are very complex, we return object here and advise that you program defensively while reading the styles.


    status: "processing" | "completed" | "failed" | "incomplete"

    The current processing status of the layer.


    bounds: null | [number, number, number, number]

    The bounding box of the layer in [west, south, east, north] order

    There are cases where the bounds are not available, such as for layers added to the map from URL sources, as these are not (depending on their type) processed and analyzed by Felt.

    Layers


    Layers in a Felt map hold geospatial data, but also configure how the data is rendered both on the map and in the legend. The data can be vector data such as Points, Lines, or Polygons, or raster data such as satellite images.

    Each Layer can be grouped under a LayerGroup, and has associated LegendItems that represent how the layer is rendered in the legend.

    You can control the visibility of layers, layer groups, and legend items using the , , and methods.

    When a Layer is styled to as categorical data or "classed" numeric data, there will be a LegendItem for each category or class. Each LegendItem can be controlled for visibility independently of the Layer, so you can turn on and off each category or class individually.

    LayerGroup


    id: string

    A string identifying the layer group.


    name: string

    The name of the layer group. This is shown in the legend.


    caption: null

    name

    caption

    description

    visible

    shownInLegend

    legendDisplay

    style

    status

    bounds

    LegendDisplay
    FSL documentation
    FeltBoundary
    |
    string

    The caption of the layer group. This is shown in the legend.


    layerIds: string[]

    The ids of the layers in the layer group.

    You can use these ids to get the full layer objects via the `getLayers` method.


    visible: boolean

    Whether the layer group is visible or not.


    shownInLegend: boolean

    Whether the layer group is shown in the legend or not.


    bounds: null | [number, number, number, number]

    The bounding box of the layer group in [west, south, east, north] order.

    FeltBoundary

    Properties

    id

    name

    caption

    layerIds

    Remarks

    visible

    shownInLegend

    bounds

    LayersController
    • LayerFeature

    • RasterValue

    • LayerFilters

    • LayerBoundaries

    • FilterLogicGate

    • FilterExpression

    • LayerGroup

    • GetLayerGroupsConstraint

    • LayerGroupChangeCallbackParams

    • LayerSchema

    • LayerSchemaCommonAttribute

    • LayerSchemaNumericAttribute

    • LayerSchemaTextAttribute

    • RasterLayerSource

    • RasterBand

    • GeoJsonUrlVectorSource

    • GeoJsonDataVectorSource

    • LayerCommon

    • RasterLayer

    • VectorLayer

    • UpdateLayerParams

    • LegendItem

    • LegendItemIdentifier

    • LegendItemsConstraint

    • LegendItemChangeCallbackParams

    • GetRasterAggregatesParams

    • RasterPercentile

    • GetRasterAggregatesResult

    • GetRasterHistogramParams

    Controller

    `setLayerVisibility`
    `setLayerGroupVisibility`
    `setLegendItemVisibility`

    Features

    Filters

    Layer Groups

    Layer Schema

    Layer sources

    Layers

    Legend Items

    Stats

    FilterTernary
    Filters
    GeometryFilter
    LayerSchemaBooleanAttribute
    LayerSchemaDateAttribute
    LayerSchemaDateTimeAttribute
    LayerSchemaAttribute
    GeoJsonFileVectorSource
    FeltTiledVectorSource
    DataOnlyLayer
    GetLayersConstraint
    LayerChangeCallbackParams
    GetRenderedFeaturesConstraint
    CreateLayersFromGeoJsonParams
    LayerProcessingStatus
    Layer
    LegendDisplay
    RasterHistogramBin
    GetRasterHistogramResult
    GetRasterCategoriesParams
    RasterCategory
    GetRasterCategoriesResult
    GetRasterProfileParams
    RasterProfileSample
    GetRasterProfileResult
    AggregationConfig
    MultiAggregationConfig
    ValueConfiguration
    GetLayerCategoriesParams
    GetLayerCategoriesGroup
    GetLayerHistogramParams
    GetLayerHistogramBin
    GetLayerCalculationParams
    CountGridConfig
    AggregatedGridConfig
    GetLayerPrecomputedCalculationParams
    RasterAggregationMethod
    AggregationMethod
    PrecomputedAggregationMethod
    GridType
    GridConfig

    ElementsController


    The Elements controller allows you to get information about the elements on the map, and make changes to their visibility.

    Extended by

    • FeltController

    Methods

    getElement()

    getElement(id: string): Promise<null | Element>

    Get a single element from the map by its id.

    Use this method when you know the specific ID of an element and want to retrieve its current state. This is more efficient than getting all elements and filtering.

    Parameter
    Type
    Description

    Promise<null | >

    A promise that resolves to the requested element, or null if not found.


    getElementGeometry(id: string): Promise<null | >

    Get the geometry of an element in GeoJSON geometry format.

    For most element types, the geometry returned is based on the coordinates property of the element, with some differences:

    • For Circle elements, the geometry is a Polygon drawn from the center and radius properties.

    • Path elements become MultiLineString geometries.

    • Marker elements return a MultiLineString of the path traced by the user as they drew the marker. Note that this is not the polygon formed by filled-in "pen" stroke, which doesn't exactly follow the path traced by the user as it is smoothed and interpolated to create a continuous line.

    Use this method when you need the geometric representation of an element for spatial analysis or visualization purposes.

    Parameter
    Type
    Description

    Promise<null | >

    A promise that resolves to the element's geometry in GeoJSON format, or null if the element has no geometry.


    getElements(constraint?: ): Promise<(null | )[]>

    Gets elements from the map, according to the constraints supplied. If no constraints are supplied, all elements will be returned.

    Use this method to retrieve multiple elements, optionally filtered by constraints. This is useful for bulk operations or when you need to analyze all elements on the map.

    Parameter
    Type
    Description

    Promise<(null | )[]>

    A promise that resolves to an array of elements, ordered by the order specified in Felt.

    The elements in the map, ordered by the order specified in Felt. This is not necessarily the order that they are drawn in, as Felt draws points above lines and lines above polygons, for instance.


    getElementGroup(id: string): Promise<null | >

    Get an element group from the map by its id.

    Element groups allow you to organize related elements together and control their visibility as a unit.

    Parameter
    Type
    Description

    Promise<null | >

    A promise that resolves to the requested element group, or null if not found.


    getElementGroups(constraint?: ): Promise<(null | )[]>

    Gets element groups from the map, according to the filters supplied. If no constraints are supplied, all element groups will be returned in rendering order.

    Use this method to retrieve multiple element groups, optionally filtered by constraints. This is useful for bulk operations on element groups.

    Parameter
    Type
    Description

    Promise<(null | )[]>

    A promise that resolves to an array of element groups in rendering order.


    setElementGroupVisibility(visibility: ): Promise<void>

    Hide or show element groups with the given ids.

    Use this method to control the visibility of multiple element groups at once. This is more efficient than hiding/showing individual elements.

    Parameter
    Type
    Description

    Promise<void>

    A promise that resolves when the visibility changes are applied.


    createElement(element: ): Promise<>

    Create a new element on the map.

    Use this method to programmatically create elements on the map. Elements created via the SDK are only available to the current session and are not persisted.

    Parameter
    Type
    Description

    Promise<>

    A promise that resolves to the created element.


    updateElement(element: ): Promise<>

    Update an element on the map. The element type must be specified.

    Use this method to modify existing elements. You can update properties like coordinates, styling, and metadata.

    Parameter
    Type
    Description

    Promise<>

    A promise that resolves to the updated element.


    deleteElement(id: string): Promise<void>

    Delete an element from the map.

    Use this method to remove elements from the map. This operation cannot be undone.

    Parameter
    Type
    Description

    Promise<void>

    A promise that resolves when the element is deleted.

    onElementCreate(args: { handler: (change: ) => void; }): VoidFunction

    Adds a listener for when an element is created.

    This will fire when elements are created programmatically, or when the user starts creating an element with a drawing tool.

    When the user creates an element with a drawing tool, it can begin in an invalid state, such as if you've just placed a single point in a polygon.

    You can use the isBeingCreated property to determine if the element is still being created by a drawing tool.

    If you want to know when the element is finished being created, you can use the listener.

    Parameter
    Type
    Description

    VoidFunction

    A function to unsubscribe from the listener.


    onElementCreateEnd(args: { handler: (params: { element: ; }) => void; }): VoidFunction

    Listens for when a new element is finished being created by a drawing tool.

    This differs from the listener, which fires whenever an element is first created. This fires when the user finishes creating an element which could be after a series of interactions.

    For example, when creating a polygon, the user places a series of points then finishes by pressing Enter or Escape. Or when creating a Place element, they add the marker, type a label, then finally deselect the element.

    Parameter
    Type
    Description

    VoidFunction

    A function to unsubscribe from the listener.


    onElementChange(args: { options: { id: string; }; handler: (change: ) => void; }): VoidFunction

    Adds a listener for when an element changes.

    This will fire when an element is being edited, either on the map by the user or programmatically.

    Like the listener, this will fire when an element is still being created by a drawing tool.

    You can check the property to determine if the element is still being created by a drawing tool.

    Parameter
    Type
    Description

    VoidFunction

    A function to unsubscribe from the listener.


    onElementDelete(args: { options: { id: string; }; handler: () => void; }): VoidFunction

    Adds a listener for when an element is deleted.

    Use this to react to element deletions, such as cleaning up related data or updating your application state.

    Parameter
    Type
    Description

    VoidFunction

    A function to unsubscribe from the listener.


    onElementGroupChange(args: { options: { id: string; }; handler: (change: ) => void; }): VoidFunction

    Adds a listener for when an element group changes.

    Use this to react to changes in element groups, such as when elements are added to or removed from groups.

    Parameter
    Type

    VoidFunction

    A function to unsubscribe from the listener.

    Text, Note and Image elements do not return geometry, so will return null.

    id

    string

    The id of the element you want to get.

    const element = await felt.getElement("element-1");

    id

    string

    The id of the element you want to get the geometry of.

    const geometry = await felt.getElementGeometry("element-1");
    console.log(geometry?.type, geometry?.coordinates);

    constraint?

    Optional constraints to apply to the elements returned from the map.

    const elements = await felt.getElements();

    id

    string

    The id of the element group you want to get.

    const elementGroup = await felt.getElementGroup("element-group-1");

    constraint?

    Optional constraints to apply to the element groups returned from the map.

    const elementGroups = await felt.getElementGroups({ ids: ["element-group-1", "element-group-2"] });

    visibility

    The visibility configuration for element groups.

    felt.setElementGroupVisibility({ show: ["element-group-1", "element-group-2"], hide: ["element-group-3"] });

    element

    The element configuration to create.

    const element = await felt.createElement({ type: "Place", coordinates: [10, 10] });

    element

    The element update configuration.

    // Update a place element's coordinates
    await felt.updateElement({
      id: "element-1",
      type: "Place",
      coordinates: [10, 20]
    });
    
    // Update a polygon's style
    await felt.updateElement({
      id: "element-2",
      type: "Polygon",
      color: "#ABC123",
      fillOpacity: 0.5
    });

    id

    string

    The id of the element to delete.

    await felt.deleteElement("element-1");

    args

    { handler: (change: ) => void; }

    -

    args.handler

    (change: ) => void

    const unsubscribe = felt.onElementCreate({
      handler: ({isBeingCreated, element}) => console.log(element.id),
    });
    
    // later on...
    unsubscribe();

    args

    { handler: (params: { element: ; }) => void; }

    -

    args.handler

    (params: { element: ; }) => void

    const unsubscribe = felt.onElementCreateEnd({
      handler: (params) => console.log(params),
    });
    
    // later on...
    unsubscribe();

    args

    { options: { id: string; }; handler: (change: ) => void; }

    -

    args.options

    { id: string; }

    const unsubscribe = felt.onElementChange({
      options: { id: "element-1" },
      handler: ({element}) => console.log(element.id),
    });
    
    // later on...
    unsubscribe();

    args

    { options: { id: string; }; handler: () => void; }

    -

    args.options

    { id: string; }

    const unsubscribe = felt.onElementDelete({
      options: { id: "element-1" },
      handler: () => console.log("element-1 deleted"),
    });
    
    // later on...
    unsubscribe();

    args

    { options: { id: string; }; handler: (change: ) => void; }

    args.options

    { id: string; }

    args.options.id

    const unsubscribe = felt.onElementGroupChange({
      options: { id: "element-group-1" },
      handler: elementGroup => console.log(elementGroup.id),
    });
    
    // later on...
    unsubscribe();

    Parameters

    Returns

    Example

    getElementGeometry()

    Parameters

    Returns

    Example

    getElements()

    Parameters

    Returns

    Remarks

    Example

    getElementGroup()

    Parameters

    Returns

    Example

    getElementGroups()

    Parameters

    Returns

    Example

    setElementGroupVisibility()

    Parameters

    Returns

    Example

    createElement()

    Parameters

    Returns

    Example

    updateElement()

    Parameters

    Returns

    Example

    deleteElement()

    Parameters

    Returns

    Example

    Events

    onElementCreate()

    Parameters

    Returns

    Example

    onElementCreateEnd()

    Parameters

    Returns

    Example

    onElementChange()

    Parameters

    Returns

    Example

    onElementDelete()

    Parameters

    Returns

    Example

    onElementGroupChange()

    Parameters

    Returns

    Example

    Element
    GeoJsonGeometry
    GeoJsonGeometry
    GetElementsConstraint
    Element
    Element
    ElementGroup
    ElementGroup
    GetElementGroupsConstraint
    ElementGroup
    ElementGroup
    SetVisibilityRequest
    ElementCreate
    Element
    Element
    ElementUpdate
    Element
    Element
    ElementChangeCallbackParams
    `onElementCreateEnd`
    Element
    `onElementCreate`
    ElementChangeCallbackParams
    `onElementCreate`
    `isBeingCreated`
    ElementGroupChangeCallbackParams

    The handler that is called when an element is created. This will fire when elements are created programmatically, or when the user starts creating an element with a drawing tool. When the user creates an element with a drawing tool, it can begin in an invalid state, such as if you've just placed a single point in a polygon. You can use the isBeingCreated property to determine if the element is still being created by a drawing tool. If you want to know when the element is finished being created, you can use the listener.

    The handler to call whenever this event fires.

    -

    args.options.id

    string

    The id of the element to listen for changes to.

    args.handler

    (change: ) => void

    The handler that is called when the element changes.

    -

    args.options.id

    string

    The id of the element to listen for deletions of.

    args.handler

    () => void

    The handler that is called when the element is deleted.

    string

    args.handler

    (change: ) => void

    GetElementsConstraint
    GetElementGroupsConstraint
    SetVisibilityRequest
    ElementCreate
    ElementUpdate
    ElementChangeCallbackParams
    ElementChangeCallbackParams
    Element
    Element
    ElementChangeCallbackParams
    ElementGroupChangeCallbackParams
    `onElementCreateEnd`
    ElementChangeCallbackParams
    ElementGroupChangeCallbackParams