import "@arcgis/map-components/components/arcgis-floor-filter";- Inheritance:
- ArcgisFloorFilter→
PublicLitElement
- 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
| Property | Attribute | Type |
|---|---|---|
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
- 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
goToOverride
- 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
- 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; longNames
- 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
referenceElement
- 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.
- Attribute
- reference-element
view
- 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
viewproperty 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 theviewproperty.
Methods
| Method | Signature |
|---|---|
componentOnReady inherited | componentOnReady(): Promise<this> |
destroy(): Promise<void> | |
updateWebDocument(webMap: WebMap | WebScene): Promise<void> |
componentOnReady
- Signature
-
componentOnReady (): Promise<this>
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!");Events
| Name | Type |
|---|---|
arcgisReady
arcgisReady: CustomEvent<void> Emitted when the component associated with a map or scene view is ready to be interacted with.