LayerList with Symbology

1673
3
03-08-2021 10:10 AM
DianeBird
New Contributor III

I'm using the layerlist with a legend sample. We have a large datasets in our webmap, and it seems to be clumsy  for the legend to appear at the top of a grouped layer set for those layer items turned on with all the listed layers down below in order to turn off the layer. This creates a lot of scrolling back and forth. Is there a way to incorporate the legend under the layer name with the on/off button on the same line? In other words, the legend would appear when the layer is turned on without creating a separate listing of legend items at the top of the open window.

3 Replies
deepakbharadwaj
New Contributor

Hi DianeBird

If you are looking for Arcgis  Javascript api 4.x solution. Please find link below from ESRI Arcgis Javascript API 4.xfor your reference.

URL: https://developers.arcgis.com/javascript/latest/sample-code/widgets-layerlist-legend/

0 Kudos
DianeBird
New Contributor III

I am using the sample code from that widget and this is what I get:

DianeBird_0-1615398185650.png

I do not want to see the same layer listed below the legend.  That requires a lot of scrolling through the list to manage visibility of layers.  I would like to see one list of the layers with the symbology right under the name of the layer. Presented much like the mxd's are.

0 Kudos
Strahanjen
Occasional Contributor II

Did you ever find a solution or work around for this? I'm having the same issue.

0 Kudos