This sample demonstrates how to use the FloorFilter widget with minimal configuration. The FloorFilter widget simplifies the process of visualizing indoor data in a JavaScript application.
The widget uses instances of FeatureLayer to visualize floor plans, indoor spaces, and floor-aware features. The map displays an office building at the Esri headquarters site in Redlands, where each floor in the building can be viewed one at a time utilizing the FloorFilter widget.
The sample sets the view property on the FloorFilter widget. The widget will update the view's floors whenever the selected floor changes. Setting the view
property will affect all floor-aware layers in the view.
// floor filter widget initialization
const floorFilter = new FloorFilter({
view: view
});
view.ui.add(floorFilter, "top-trailing");