Display and browse through building floors from a floor-aware web map.
Use case
Having map data to aid indoor navigation in buildings with multiple floors such as airports, museums, or offices can be incredibly useful. For example, you may wish to browse through all available floor maps for an office in order to find the location of an upcoming meeting in advance.
How to use the sample
Use the dropdown menu to browse different floor levels in the facility. Only the selected floor will be displayed.
How it works
Create a PortalItem using the identifier of a floor-aware web map.
Create a map using the portal item.
Create a map view and assign the map to it.
Wait for the map to load and retrieve the map's FloorManager.
Wait for the floor manager to load and get its list of FloorLevels.
Set the isVisible property to false for all floor levels.
Set only the selected FloorLevel to visible using the isVisible property of the floor level.
Note: Manually set the default floor level to the first floor.
Relevant API
FloorLevel
FloorManager
About the data
This sample uses a floor-aware web map that displays the floors of Building L on the Esri Redlands campus.
Additional information
The FloorManager API also supports browsing different sites and facilities in addition to building floors.