<?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 Show not loaded layers in layerList in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-not-loaded-layers-in-layerlist/m-p/1300872#M81439</link>
    <description>&lt;P&gt;Currently when the layer is not loaded because of any kind of error, it is not shown in layerTree. I would like it to be shown in layerTree with error indicator - red styled text or some warning icon.&lt;/P&gt;&lt;P&gt;I already tried to listen on layerview-create-error and then set listMode manually but it does not help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;layer.on('layerview-create-error', function(error: any) {
  layer.listMode = "show";
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The layer itself is stored with &lt;STRONG&gt;map.layers&lt;/STRONG&gt; collection so the LayerList widget must be filtering it out by some attribute. I cannot change &lt;STRONG&gt;loadStatus&lt;/STRONG&gt; or &lt;STRONG&gt;loaded&lt;/STRONG&gt; attributes as it will break other things with not loaded layer.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Jun 2023 22:45:04 GMT</pubDate>
    <dc:creator>patryks</dc:creator>
    <dc:date>2023-06-19T22:45:04Z</dc:date>
    <item>
      <title>Show not loaded layers in layerList</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-not-loaded-layers-in-layerlist/m-p/1300872#M81439</link>
      <description>&lt;P&gt;Currently when the layer is not loaded because of any kind of error, it is not shown in layerTree. I would like it to be shown in layerTree with error indicator - red styled text or some warning icon.&lt;/P&gt;&lt;P&gt;I already tried to listen on layerview-create-error and then set listMode manually but it does not help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;layer.on('layerview-create-error', function(error: any) {
  layer.listMode = "show";
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The layer itself is stored with &lt;STRONG&gt;map.layers&lt;/STRONG&gt; collection so the LayerList widget must be filtering it out by some attribute. I cannot change &lt;STRONG&gt;loadStatus&lt;/STRONG&gt; or &lt;STRONG&gt;loaded&lt;/STRONG&gt; attributes as it will break other things with not loaded layer.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 22:45:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-not-loaded-layers-in-layerlist/m-p/1300872#M81439</guid>
      <dc:creator>patryks</dc:creator>
      <dc:date>2023-06-19T22:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Show not loaded layers in layerList</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-not-loaded-layers-in-layerlist/m-p/1301005#M81445</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/619295"&gt;@patryks&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;There is a property on the LayerList widget named &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#visibleElements" target="_self"&gt;visibleElements&lt;/A&gt; where you can enable displaying error messages. You can see it enabled in this &lt;A href="https://codepen.io/sagewall/pen/RwqRByB" target="_self"&gt;codepen&lt;/A&gt;. We are currently working on improving the error handling and the messages provided, but hopefully this helps.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const layerList = new LayerList({
    view,
    visibleElements: {
        errors: true
    }
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 11:18:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-not-loaded-layers-in-layerlist/m-p/1301005#M81445</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2023-06-20T11:18:32Z</dc:date>
    </item>
  </channel>
</rss>

