<?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 How to manually refresh the layerList after creation in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-manually-refresh-the-layerlist-after/m-p/307846#M28254</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am adding/removing layers nested within group layers. These modifications do not seem to always cause a refresh/ trigger the&amp;nbsp;listItemCreatedFunction to rerun. I need the&amp;nbsp;listItemCreatedFunction to run everytime i add/remove layers from the map/nested groups.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I force a refresh of the layerlist? I have noticed that the layerlist triggers&amp;nbsp;listItemCreatedFunction at initial creation and also when using sketchviewmodel.complete().&lt;/P&gt;&lt;P&gt;I've considered creating a new layerlist and replacing the existing list, but that seems like a resource intensive option.&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Jan 2020 00:02:38 GMT</pubDate>
    <dc:creator>NickStapler</dc:creator>
    <dc:date>2020-01-22T00:02:38Z</dc:date>
    <item>
      <title>How to manually refresh the layerList after creation</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-manually-refresh-the-layerlist-after/m-p/307846#M28254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am adding/removing layers nested within group layers. These modifications do not seem to always cause a refresh/ trigger the&amp;nbsp;listItemCreatedFunction to rerun. I need the&amp;nbsp;listItemCreatedFunction to run everytime i add/remove layers from the map/nested groups.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I force a refresh of the layerlist? I have noticed that the layerlist triggers&amp;nbsp;listItemCreatedFunction at initial creation and also when using sketchviewmodel.complete().&lt;/P&gt;&lt;P&gt;I've considered creating a new layerlist and replacing the existing list, but that seems like a resource intensive option.&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2020 00:02:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-manually-refresh-the-layerlist-after/m-p/307846#M28254</guid>
      <dc:creator>NickStapler</dc:creator>
      <dc:date>2020-01-22T00:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to manually refresh the layerList after creation</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-manually-refresh-the-layerlist-after/m-p/307847#M28255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Nick. Can you post a code pen or some other live app that demonstrates this issue? You shouldn't have to refresh the LayerList yourself. If the updates aren't getting picked up, then it could be a bug.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2020 16:44:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-manually-refresh-the-layerlist-after/m-p/307847#M28255</guid>
      <dc:creator>KristianEkenes</dc:creator>
      <dc:date>2020-01-22T16:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to manually refresh the layerList after creation</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-manually-refresh-the-layerlist-after/m-p/307848#M28256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kristian,&lt;/P&gt;&lt;P&gt;Here Is a code example.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://codepen.io/greenGoose45/pen/WNbPvNL" title="https://codepen.io/greenGoose45/pen/WNbPvNL"&gt;https://codepen.io/greenGoose45/pen/WNbPvNL&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To simulate the error, press the "addlayer to group button" once the map has loaded and look for the added layer within the innermost grouplayer. The legend is not generated for these layer and if you put a breakpoint in the console, the &lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;listItemCreatedFunction does not trigger.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm also attaching the html file if that works better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2020 17:59:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-manually-refresh-the-layerlist-after/m-p/307848#M28256</guid>
      <dc:creator>NickStapler</dc:creator>
      <dc:date>2020-01-22T17:59:27Z</dc:date>
    </item>
  </channel>
</rss>

