Skip to content
ESM
import "@arcgis/map-components/components/arcgis-floor-filter";
Inheritance:
ArcgisFloorFilterPublicLitElement
Since
ArcGIS Maps SDK for JavaScript 4.28

The Floor Filter component simplifies visualization of GIS data for a specific floor of a building in your application. It allows you to filter down the floor plan data displayed in your arcgis-map or arcgis-scene to a site, a facility in the site, or a level in the facility.

To visualize your data based on site, facility, or level, your map must contain the related floor plan layers, with features linked together in a floor plan hierarchy. Once you define your map as floor-aware in the map properties, the interactive, on-screen Floor Filter component appears and can be used to explore the floor-aware data based on the configured site, facility, and levels layers. The Floor Filter component currently supports FeatureLayers, SceneLayers and MapImageLayers (map services).

The component can also be used alongside other filtering functionalities, such as definition queries, selection, range, and time, to further control visualization. For example, you may want to visualize all of the features on a specific level in a facility, or all the office units within a range of levels in a facility.

Note

If a default site, facility, or level is selected in the floor filter when sharing a floor-aware web map from ArcGIS Pro, it will also be the default selection within the Floor Filter component.

Demo

Example
<arcgis-map itemId="f133a698536f44c8884ad81f80b6cfc7">
<arcgis-floor-filter slot="top-right"/>
</arcgis-map>

Properties

PropertyAttributeType
auto-destroy-disabled
facility
reflected
facility
headingLevel
reflected
heading-level
icon
label
level
reflected
level
longNames
reflected
long-names
reference-element
site
reflected
site

autoDestroyDisabled

Property
Type
boolean

If true, the component will not be destroyed automatically when it is disconnected from the document. This is useful when you want to move the component to a different place on the page, or temporarily hide it. If this is set, make sure to call the destroy() method when you are done to prevent memory leaks.

Attribute
auto-destroy-disabled
Default value
false

facility

reflected Property
Type
string | null | undefined

The currently selected facility.

Attribute
facility

goToOverride

Property
Type
GoToOverride | null | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

This function provides the ability to override either the arcgis-map.goTo() or arcgis-scene.goTo() methods.

Example
component.goToOverride = function(view, goToParams) {
goToParams.options = {
duration: updatedDuration
};
return view.goTo(goToParams.target, goToParams.options);
};

headingLevel

reflected Property
Type
HeadingLevel

Indicates the heading level to use for the headings separating floors in buildings. By default, the building name is rendered as a level 2 heading (e.g. <h2>Building name</h2>). Depending on the component's placement in your app, you may need to adjust this heading for proper semantics. This is important for meeting accessibility standards.

See also
Attribute
heading-level
Default value
2
Example
// building headings will render as an <h3>
floorFilter.headingLevel = 3;

icon

Property
Type
IconName | undefined

Icon which represents the component. Typically used when the component is controlled by another component (e.g. by the Expand component).

See also
Attribute
icon
Default value
"urban-model"

label

Property
Type
string | undefined

The component's default label.

Attribute
label

level

reflected Property
Type
string | null | undefined

The currently selected floor level.

Attribute
level

longNames

reflected Property
Type
boolean

Determines if the component is expanded or collapsed. If the value is true, the component is expanded and the long names appear. Otherwise, short names are used and icons appear alone on buttons.

Attribute
long-names
Default value
false

messageOverrides

Property
Type
Record<string, unknown> | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Replace localized message strings with your own strings.

Note: Individual message keys may change between releases.

referenceElement

Property
Type
ArcgisReferenceElement | string | undefined

By assigning the id attribute of the Map or Scene component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the Map or Scene.

See also
Attribute
reference-element

site

reflected Property
Type
string | null | undefined

The currently selected site.

Attribute
site

view

Property
Type
MapViewOrSceneView | null | undefined

The view associated with the component.

Note: The recommended approach is to fully migrate applications to use map and scene components and avoid using MapView and SceneView directly. However, if you are migrating a large application from widgets to components, you might prefer a more gradual transition. To support this use case, the SDK includes this view property which connects a component to a MapView or SceneView. Ultimately, once migration is complete, the arcgis-floor-filter component will be associated with a map or scene component rather than using the view property.

Methods

MethodSignature
componentOnReady
inherited
componentOnReady(): Promise<this>
destroy(): Promise<void>
updateWebDocument(webMap: WebMap | WebScene): Promise<void>

componentOnReady

inherited Method
Signature
componentOnReady (): Promise<this>
Inherited from: PublicLitElement

Creates a promise that resolves once the component is fully loaded.

Returns
Promise<this>
Example
const arcgisFloorFilter = document.querySelector("arcgis-floor-filter");
document.body.append(arcgisFloorFilter);
await arcgisFloorFilter.componentOnReady();
console.log("arcgis-floor-filter is ready to go!");

destroy

Method
Signature
destroy (): Promise<void>

Permanently destroy the component.

Returns
Promise<void>

updateWebDocument

Method
Signature
updateWebDocument (webMap: WebMap | WebScene): Promise<void>
Parameters
ParameterTypeDescriptionRequired
webMap
Returns
Promise<void>

Events

arcgisReady

Event
arcgisReady: CustomEvent<void>

Emitted when the component associated with a map or scene view is ready to be interacted with.

bubbles composed cancelable