LogoLogo
Sign upHelp CenterContactSocial
JS SDK API Reference
JS SDK API Reference
  • API Reference
  • @feltmaps/js-sdk
  • Elements
    • CircleElementCreate
    • CircleElementRead
    • CircleElementUpdate
    • Element
    • ElementChangeCallbackParams
    • ElementCreate
    • ElementGroup
    • ElementGroupChangeCallbackParams
    • ElementUpdate
    • ElementsController
    • GetElementGroupsConstraint
    • GetElementsConstraint
    • HighlighterElementCreate
    • HighlighterElementRead
    • HighlighterElementUpdate
    • ImageElementCreate
    • ImageElementRead
    • ImageElementUpdate
    • LinkElementRead
    • MarkerElementCreate
    • MarkerElementRead
    • MarkerElementUpdate
    • NoteElementCreate
    • NoteElementRead
    • NoteElementUpdate
    • PathElementCreate
    • PathElementRead
    • PathElementUpdate
    • PlaceElementCreate
    • PlaceElementRead
    • PlaceElementUpdate
    • PolygonElementCreate
    • PolygonElementRead
    • PolygonElementUpdate
    • TextElementCreate
    • TextElementRead
    • TextElementUpdate
  • Interactions
    • InteractionsController
    • MapInteractionEvent
  • Layers
    • AggregationConfig
    • AggregationMethod
    • CreateLayersFromGeoJsonParams
    • DataOnlyLayer
    • FeltTiledVectorSource
    • FilterExpression
    • FilterLogicGate
    • FilterTernary
    • Filters
    • GeoJsonDataVectorSource
    • GeoJsonFileVectorSource
    • GeoJsonUrlVectorSource
    • GeometryFilter
    • GetLayerCalculationParams
    • GetLayerCategoriesGroup
    • GetLayerCategoriesParams
    • GetLayerGroupsConstraint
    • GetLayerHistogramBin
    • GetLayerHistogramParams
    • GetLayersConstraint
    • GetRenderedFeaturesConstraint
    • Layer
    • LayerBoundaries
    • LayerChangeCallbackParams
    • LayerCommon
    • LayerFeature
    • LayerFilters
    • LayerGroup
    • LayerGroupChangeCallbackParams
    • LayerProcessingStatus
    • LayerSchema
    • LayerSchemaAttribute
    • LayerSchemaBooleanAttribute
    • LayerSchemaCommonAttribute
    • LayerSchemaDateAttribute
    • LayerSchemaDateTimeAttribute
    • LayerSchemaNumericAttribute
    • LayerSchemaTextAttribute
    • LayersController
    • LegendItem
    • LegendItemChangeCallbackParams
    • LegendItemIdentifier
    • LegendItemsConstraint
    • MultiAggregationConfig
    • RasterBand
    • RasterLayer
    • RasterLayerSource
    • RasterValue
    • UpdateLayerParams
    • ValueConfiguration
    • VectorLayer
  • Main
    • Felt
    • FeltController
    • FeltEmbedOptions
  • Misc
    • MapDetails
    • MiscController
  • Selection
    • ElementGroupNode
    • ElementNode
    • EntityNode
    • FeatureNode
    • FeatureSelection
    • LayerGroupNode
    • LayerNode
    • SelectionController
  • Shared
    • FeltBoundary
    • FeltZoom
    • GeoJsonFeature
    • GeoJsonGeometry
    • GeoJsonProperties
    • LatLng
    • LineStringGeometry
    • LngLatTuple
    • MultiLineStringGeometry
    • MultiPointGeometry
    • MultiPolygonGeometry
    • PointGeometry
    • PolygonGeometry
    • SetVisibilityRequest
    • SortConfig
    • SortDirection
  • Tools
    • CircleToolSettings
    • ConfigurableToolType
    • HighlighterToolSettings
    • InputToolSettings
    • LineToolSettings
    • MarkerToolSettings
    • NoteToolSettings
    • PinToolSettings
    • PlaceFrame
    • PlaceSymbol
    • PolygonToolSettings
    • RouteToolSettings
    • TextToolSettings
    • ToolSettingsChangeEvent
    • ToolSettingsMap
    • ToolType
    • ToolsController
  • UI
    • OnMapInteractionsOptions
    • UiController
    • UiControlsOptions
  • Viewport
    • SetViewportCenterZoomParams
    • ViewportCenterZoom
    • ViewportConstraints
    • ViewportController
    • ViewportFitBoundsParams
    • ViewportState
Powered by GitBook
On this page
  • Extended by
  • Methods
  • updateUiControls()
  • setOnMapInteractionsUi()
  • showLayerDataTable()
  • hideLayerDataTable()

Was this helpful?

Export as PDF
  1. UI

UiController

PreviousOnMapInteractionsOptionsNextUiControlsOptions

Last updated 27 days ago

Was this helpful?


The UI controller allows you to control various aspects of the Felt UI in your embedded map.

This includes enabling/disabling UI controls, managing on-map interactions, and controlling the visibility of UI components like the data table.

Extended by

Methods

updateUiControls()

updateUiControls(controls: ): void

Updates the UI controls on the embedded map.

Parameters

Parameter
Type
Description

controls

The controls to update.

Returns

void

Example

// Show some UI controls
await felt.updateUiControls({
  showLegend: true,
  fullScreenButton: true,
});

// Disable some UI options
await felt.updateUiControls({
  cooperativeGestures: false,
  geolocation: false,
});

setOnMapInteractionsUi()

Control the on-map UI shown when interacting with features and elements.

If you add your own click, selection or hover handlers you may want to disable various parts of the Felt UI. This method allows you to control the visibility of various parts of the UI that might otherwise be shown when people click or hover on things.

This does not affect selection. That means that selectable features and elements will still be selected when clicked.

Parameters

Parameter
Type

options

Returns

void

Example

// Disable UI when hovering or selecting features
await felt.setOnMapInteractionsUi({
  featureSelectPanel: false,
  featureHoverPanel: false,
});

showLayerDataTable()

Shows a data table view for the specified layer, optionally sorted by a given attribute.

Parameters

Parameter
Type

params?

params.layerId?

string

params.sorting?

Returns

Promise<void>

Example

// Show data table with default sorting
await felt.showLayerDataTable({
  layerId: "layer-1",
});

// Show data table sorted by height in descending order
await felt.showLayerDataTable({
  layerId: "layer-1",
  sorting: {
    attribute: "height",
    direction: "desc",
  },
});

// Show the data table pane with no table visible
await felt.showLayerDataTable();

hideLayerDataTable()

hideLayerDataTable(): Promise<void>

Hides the data table.

Returns

Promise<void>

Example

await felt.hideLayerDataTable();

setOnMapInteractionsUi(options: ): void

showLayerDataTable(params?: { layerId: string; sorting: ; }): Promise<void>

{ layerId: string; sorting: ; }

FeltController
UiControlsOptions
OnMapInteractionsOptions
SortConfig
UiControlsOptions
OnMapInteractionsOptions
SortConfig
SortConfig