Select to view content in your preferred language

Expand Grouped Layers by Default

3105
18
07-20-2023 08:25 AM
Status: Open
Labels (2)
lmurrayADOT
Regular Contributor

It would be helpful to have the option for grouped layers to be expanded by default within the Experience Builder Map Layers Widget.  Ideally, it would help to select which grouped layers are expanded and which are compressed by default.  However, even just having the ability to expand all grouped layers by default would make it easier for users to locate the layer they want to view.

18 Comments
AllisonTalsma

Our organization would also find this benneficial in recreating past web app builders to keep the change as seemless as possible for our staff. 

ODWC_GIS

I'd like to Second EagleAdmin and AllisonTalsma's Very Rational Observations.

Then repeat my request louder.

Increasing the Volume with Each Repetition.

WillMcAllister7

Adding that this functionality is very important particularly when trying to use exclusive visibility -- it's hard for a user to understand they need to expand a group layer in order to see other layers.

jchester73

Definitely would enhance functionality to have this option!

CreateBig_Trina

Crazy that this isnt already a feature! Please add this 🙂

Brian_McLeer

On Experience Builder Developer Edition 1.15, I copied the map layers widget from "path\to\your\ArcGISExperienceBuilder\client\dist\widgets\arcgis\map-layers" and pasted it into "path\to\your\ArcGISExperienceBuilder\client\your-extensions\widgets", followed by renaming to map-layers-custom.

In the "path\to\your\ArcGISExperienceBuilder\client\your-extensions\widgets\map-layers-custom\src\runtime\widget.tsx" file starting at line 330, I updated from this:

 

  defineLayerListActions = async (event) => {
    const listItem = event.item
    let actionGroups = {}
    listItem.actionsSections = []

    if (this.props.config?.useMapWidget && this.props.config?.enableLegend && listItem.layer.legendEnabled) {
      listItem.panel = {
        content: 'legend',
        open: listItem.layer.visible && this.props.config?.showAllLegend
      }
    }

 

to this:

 

  defineLayerListActions = async (event) => {
    const listItem = event.item
    let actionGroups = {}
    listItem.actionsSections = []

    listItem.open = true

    if (this.props.config?.useMapWidget && this.props.config?.enableLegend && listItem.layer.legendEnabled) {
    listItem.panel = {
      content: 'legend',
      open: true
    }
  }

 

I then added the custom widget in and the layers were expanded by default. 

Don't forget to update the manifest.json file on lines 2 and 3. 

  "name": "map-layers-custom",
  "label": "Map Layers Custom",
mattprice

Hello, Please add this functionality. Thanks!

L77
by

I used this is webapp builder a lot and would like to use it in experience builder.

It would be nice to be able to pick which groups are expanded by default and which ones are not based on which datasets are commonly used or rarely used.