Summary
In ArcGIS Online, Map Viewer allows users to create and manage group layers in a web map. However, it is a known limitation that ArcGIS Web AppBuilder does not support web maps with group layers as stated in the 'Which apps can use Group Layers?' section of this ArcGIS Blog.
When creating an ArcGIS Web AppBuilder app using a web map with group layers, the group layers are flattened to individual layers in the Layer List widget.
In the Map Viewer Layers pane
In the ArcGIS Web AppBuilder Layer List widget
This article provides several alternatives to display group layers in the ArcGIS Web AppBuilder Layer List widget.
Procedure
Use one of the following options to display group layers in ArcGIS Web AppBuilder or ArcGIS Online web apps that support group layers.
Create multiple Layer List widgets and configure them to display the group layers
In ArcGIS Web AppBuilder, add multiple Layer List widgets, and group them to display the group layers.
- In ArcGIS Web AppBuilder, on the Widget tab, click Set the widgets in this controller.
- On the Widget tab, click Click here to add widget > Layer List > OK.
- In the Configure Layer List window, set the following parameters:
- Name the widget according to the group layer’s name. In this example, the Layer List widget is Group 1.
- Under Choose which layers will be shown on the list, uncheck the non-related layers. In this example, the group layer named Group 1 comprises the layers titled Subway Stations, Public Bicycles, and Subway Lines.
- Click OK.
- Repeat Steps 2 and 3 for all the other group layers.
- On the Widget tab, in the Widgets pane, drag and drop all the Layer List widgets to create a widget group.
- On the Widget tab, hover over the widget group, and click Configure.
- In the Configure window, specify a name for the widget group, and click OK. In this example, the group is named Layer List.
- On the Widget tab, click Save to save the configurations.
The image below shows the layers grouped accordingly in the ArcGIS Web AppBuilder Layer List widget.
Create an ArcGIS Web AppBuilder app using a scene with group layers
Instead of using a web map, use a scene with group layers to create an ArcGIS Web AppBuilder app in ArcGIS Online.
- In Scene Viewer, create a new scene, and add the desired layers to it.
- In the Layer Manager pane, browse to a layer, click More Options , and select Add to new group.
- Rename the group, and drag the desired layers into the group.
- On the Designer toolbar, click Save to save the scene.
- Click View item details on the banner at the bottom of the scene. Alternatively, open the item details page from ArcGIS Online.
- On the item details page, click Create Web App > Web AppBuilder.
- In the Create a New Web App window, configure the Title and Tags fields, and click OK.
- In ArcGIS Web AppBuilder, on the Widget tab, click Set the widgets in this controller.
- On the Widget tab, click Click here to add widget > Layer List > OK.
- In the Configure Layer List window, click OK.
- On the Widget tab, click Save to save the configurations.
The image below shows the group layers displayed in the ArcGIS Web AppBuilder Layer List widget.
Use compatible ArcGIS Online web apps to view the web map’s group layers
Create ArcGIS Online web apps that support group layers for the web map, such as ArcGIS Experience Builder, ArcGIS Instant Apps (Interactive Legend, Minimalist, and Media Map), and ArcGIS StoryMaps. Refer to ArcGIS Online: Create apps from maps for more information.