The Floor Filter widget allows users to explore floor-aware maps and scenes. Floor-aware maps and scenes contain indoor GIS data representing floor plan features, including levels, facilities, and sites and assets such as fire extinguishers, defibrillators, and first-aid kits. The widget allows users to visualize and interact with floor plan data by navigating to a site, a facility in a site, and a level in a facility. Users can also filter data based on a selected floor plan.
Examples
Use this widget to support app design requirements such as the following:
- Provide an interactive app for exploring renderings of indoor spaces.
- Visualize space in a large office building to help inform decisions about optimal use of floor space.
- Locate wheelchairs, mobile defibrillators, and other critical assets in a medical facility and help staff identify the nearest available resources.
Usage notes
This widget requires connection to a Map widget. To use the floor filter, the Map widget must be connected to a floor-aware map.
When you include this widget in an app, a toolbar provides users with the following tools for filtering:
- Browse—Use the browse panel to zoom to and view sites, facilities within sites, and floors within facilities. The browse panel includes a search function, sites list, and facilities list.
- Floor list—View a list of all the floors in the selected facility. If a facility has multiple floors, you can choose a floor from the list to view it on the map.
- Zoom to—Zoom to the selected facility.
- Expand or Collapse—Expand or collapse the widget's toolbar.
Settings
The Floor Filter widget includes the following settings:
- Select a floor aware map—Select a Map widget connected to a floor-aware map.
- Expand on startup—Choose whether the widget's toolbar is in the expanded state when the app opens.
- Filter data by selected floor—If this setting is turned on, when the user selects a floor in a facility, the widget filters the connected data sources to only show features on that floor. Other facilities display ground floor data. You can use this setting to filter data in Table widgets, Chart widgets, Feature Info widgets, and other data-centric widgets that are connected to the same data source as the Floor Filter widget.
- Display selected floor only—Only display data from the selected floor of the current facility. Do not display any data from other facilities.
- Switch floor on feature selection—If this setting is turned on, when the user selects a floor-aware feature with another widget, such as a Search widget or Table widget, the Floor Filter widget displays the floor that contains that feature.
- Zoom to selected floor—Zoom the map to the extent of the floor that contains the selected feature.
Tip:
If you want to zoom to selected features instead of to the entire floor, leave this setting unchecked and instead add a Zoom to message action. On the Action tab of a widget's settings, such as the Table widget, add the Record selection changes trigger, choose the Map widget as the target, and select the Zoom to action. Optionally, you can set a custom zoom scale.
Note:
The Filter data selected floor and Display selected floor only settings are appropriate if you want the Floor Filter widget and map to be the focus of a page, so other widgets update based on selections made with the Floor Filter widget. The Switch floor on feature selection and Zoom to selected floor settings are appropriate if you want another widget to be the main way to interact with data on a page, so the Floor Filter widget and map update based on selections made with that widget. Choose a combination of settings based on the intended purpose of your Experience Builder app.
- Zoom to selected floor—Zoom the map to the extent of the floor that contains the selected feature.
- Arrangement style—Select an arrangement style for the widget. The arrangement style affects the order of the controls, and the direction in which the browse panel appears or slides. For example, with the Bottom up, slide right arrangement selected, the Browse button is located at the bottom of the widget, and when the user clicks Browse, the facilities list and search bar appear to the right of the widget.
Tip:
It is recommended that you place the Floor Filter widget over the corner of the connected Map widget and choose the arrangement style based on where the widget is placed. For example, when placing the widget over the upper right corner of the map, choose Top down, slide left. When placing the widget in the bottom left, choose Bottom up, slide right. This ensures that the widget expands and slides out and away from the corner and that the toolbar stays fixed in its position.
Arcade
You can use the Filter data by selected floor setting, the Display selected floor only setting, and an Arcade expression to automatically populate fields for new floor-aware features created with the Edit widget. If you add the following expression to a form, fields automatically populate when you create new features in a floor-aware layer.
if ($editcontext.editType == "INSERT") {
var levelsLayer = FeatureSetByName($map, "Levels", ["*"], true);
var features = Intersects(levelsLayer,$feature);
if (Count(features) > 0) {
var levelId = First(features)["LEVEL_ID"];
return levelId;
}
}
return $feature["LEVEL_ID"];
Note:
The field name LEVEL_ID is the default field name for levels in floor-aware layers. If your layer uses a custom field name for levels, use that field name instead.
The above code sample is only applicable for creating new features.