<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can't See Empty Group Layers in Layers Widget in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-see-empty-group-layers-in-layers-widget/m-p/1153259#M76632</link>
    <description>&lt;P&gt;For group layer to visible in LayerList use&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;layer&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;listMode&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'show'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 14 Mar 2022 04:43:12 GMT</pubDate>
    <dc:creator>ShefaliMantri</dc:creator>
    <dc:date>2022-03-14T04:43:12Z</dc:date>
    <item>
      <title>Can't See Empty Group Layers in Layers Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-see-empty-group-layers-in-layers-widget/m-p/1153199#M76629</link>
      <description>&lt;P&gt;I want to see empty Group Layers in the layers widget, but it seems that it can't be done.&lt;BR /&gt;Is there a possibility to see them without adding another layer?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Here is a code sample:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="utf-8" /&amp;gt;
    &amp;lt;meta
      name="viewport"
      content="initial-scale=1,maximum-scale=1,user-scalable=no"
    /&amp;gt;
    &amp;lt;title&amp;gt;
      MapImageLayer - Wrong spatialReference
    &amp;lt;/title&amp;gt;

    &amp;lt;link
      rel="stylesheet"
      href="https://js.arcgis.com/4.22/esri/themes/light/main.css"
    /&amp;gt;
    &amp;lt;script src="https://js.arcgis.com/4.22/"&amp;gt;&amp;lt;/script&amp;gt;

    &amp;lt;script&amp;gt;
	/*****************************************************************
	*demo code loading service with incorrect spatialReference, result- the layer is loaded but view.when() and view.whenLayerView() are not being triggerd
	*and there are no errors
	*****************************************************************/	 
      require(["esri/Map",
      "esri/views/MapView",
      "esri/layers/GroupLayer", 
      "esri/widgets/LayerList",
      "esri/widgets/Expand",
      "esri/geometry/SpatialReference"], (
        Map,
        MapView,
        GroupLayer,
        LayerList,
        Expand,
        SpatialReference
      ) =&amp;gt; {
        
        const layer = new GroupLayer();
        
        const map = new Map({
          layers: [layer]
        });

        const view = new MapView({
          container: "viewDiv",
          map: map,
          spatialReference: new SpatialReference({ wkid: 102100 }),
          zoom: 3
        });
        
        const layerList = new LayerList({
          view: view
        });
        
         const layersExpand = new Expand({
          view: view,
          content: layerList,
          expandIconClass: "esri-icon-layers",
          id: "expandWidget"
        });
        
        view.ui.add(layersExpand, "top-right");

        layer.when(() =&amp;gt; {
          console.log('layer loaded')
        },
        () =&amp;gt; { 
          console.log('failed to load layer') 
          
        });


        /*****************************************************************
         *layer was loaded but this is not getting called and no error callback
         *****************************************************************/	 
		   view.when(() =&amp;gt; {
            console.log('view is ready')
          }, ()=&amp;gt; {
            console.log('view error')
          });
          
          
          /*****************************************************************
         * layer view is not created here and we do not get any error
         *****************************************************************/	  
        view.whenLayerView(layer)
          .then(function (layerView) {
             console.log('layer view created')
          })
          .catch(function (error) {
            console.log('creating layer view failed')
          });
          
          
      });
    &amp;lt;/script&amp;gt;

    &amp;lt;style&amp;gt;
      html,
      body {
        padding: 0;
        margin: 0;
        height: 100%;
        width: 100%;
      }

      #viewDiv {
        position: absolute;
        right: 0;
        left: 0;
        top: 0;
        bottom: 60px;
      }
    &amp;lt;/style&amp;gt;
  &amp;lt;/head&amp;gt;

  &amp;lt;body&amp;gt;
    &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sun, 13 Mar 2022 12:57:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-see-empty-group-layers-in-layers-widget/m-p/1153199#M76629</guid>
      <dc:creator>Farerb</dc:creator>
      <dc:date>2022-03-13T12:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: Can't See Empty Group Layers in Layers Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-see-empty-group-layers-in-layers-widget/m-p/1153259#M76632</link>
      <description>&lt;P&gt;For group layer to visible in LayerList use&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;layer&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;listMode&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'show'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 14 Mar 2022 04:43:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-see-empty-group-layers-in-layers-widget/m-p/1153259#M76632</guid>
      <dc:creator>ShefaliMantri</dc:creator>
      <dc:date>2022-03-14T04:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Can't See Empty Group Layers in Layers Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-see-empty-group-layers-in-layers-widget/m-p/1153394#M76638</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;GroupLayer is visible in the LayerList even if it empty. You won't see the arrow to expand to see the layers in the GroupLayer because the layer is empty. If you drag and drop layers into the GroupLayer then you will see the arrow to expand. Not sure if this is what you are talking about.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;With your code, you should see this when your app is initialized.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-03-14 at 8.36.37 AM.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/36259i0252FF28616BFC89/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2022-03-14 at 8.36.37 AM.png" alt="Screen Shot 2022-03-14 at 8.36.37 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 15:38:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-see-empty-group-layers-in-layers-widget/m-p/1153394#M76638</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2022-03-14T15:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can't See Empty Group Layers in Layers Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-see-empty-group-layers-in-layers-widget/m-p/1154150#M76667</link>
      <description>&lt;P&gt;This isn't what i'm talking about.&lt;BR /&gt;My issue is that when I try to load empty group layers, I don't see the group layers in the layers widget. I want to see them all the time even if they're empty.&lt;BR /&gt;&lt;BR /&gt;for that matter if i put an empty group layer 'x' in a group layer 'y', I won't see either of them.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 07:23:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-see-empty-group-layers-in-layers-widget/m-p/1154150#M76667</guid>
      <dc:creator>Farerb</dc:creator>
      <dc:date>2022-03-16T07:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: Can't See Empty Group Layers in Layers Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-see-empty-group-layers-in-layers-widget/m-p/1154151#M76668</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I noticed that it is the default value, tried to add it anyway and it doesn't seem to work.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 07:23:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-see-empty-group-layers-in-layers-widget/m-p/1154151#M76668</guid>
      <dc:creator>Farerb</dc:creator>
      <dc:date>2022-03-16T07:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: Can't See Empty Group Layers in Layers Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-see-empty-group-layers-in-layers-widget/m-p/1154171#M76671</link>
      <description>&lt;P&gt;By the way - I don't use a basemap and I do not want to use one.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 09:24:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-t-see-empty-group-layers-in-layers-widget/m-p/1154171#M76671</guid>
      <dc:creator>Farerb</dc:creator>
      <dc:date>2022-03-16T09:24:24Z</dc:date>
    </item>
  </channel>
</rss>

