Hello!
I was able to group my layers in the layerlist widget as I needed it, but the problem is that now, for example, my legend widget always displays "No legends".
Running a debug, I realized that the operational layers of the map obviously are no longer in the standard object, but in the clustered one. However, I tried to modify the following lines in the legend widget, but I did not succeed.
...
this._jimuLayerInfos = LayerInfos.getInstanceSync();  //This line
var legendParams = 
{
        arrangement: this.config.legend.arrangement,
        autoUpdate: this.config.legend.autoUpdate,
        respectCurrentMapScale: this.config.legend.respectCurrentMapScale,
        //respectVisibility: false,
        map: this.map,
        layerInfos: this._getLayerInfosParam() ////This line
};
...
For grouping the layers, finally, I used the tip contained in the link below.
https://community.esri.com/thread/174943
Thanks for the help.
Gilberto.
Solved! Go to Solution.
Hello!
I found the solution. It was only necessary to change the code snippet below in the file "... \ widgets \ Legend \ Utils.js".
...
var getLayerInfosParamFromCurrentMap = function() 
 {
        var layerInfosParam = [];
        var jimuLayerInfos = LayerInfos.getInstanceSync();
        var jimuLayerInfoArray = jimuLayerInfos._layerInfos; //jimuLayerInfos.getLayerInfoArray();
 
        array.forEach
        (
...
Hello!
I found the solution. It was only necessary to change the code snippet below in the file "... \ widgets \ Legend \ Utils.js".
...
var getLayerInfosParamFromCurrentMap = function() 
 {
        var layerInfosParam = [];
        var jimuLayerInfos = LayerInfos.getInstanceSync();
        var jimuLayerInfoArray = jimuLayerInfos._layerInfos; //jimuLayerInfos.getLayerInfoArray();
 
        array.forEach
        (
...