<?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: Delete Cluster Layers in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/delete-cluster-layers/m-p/1516622#M85255</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/797548"&gt;@LIZDean&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#applyEdits" target="_self"&gt;FeatureLayer.applyEdits()&lt;/A&gt; - if you want to delete the features but leave the layers for later use&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#removeMany" target="_self"&gt;Map.removeMany()&lt;/A&gt; - if you want to remove the layer from the map but maybe readd it again&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#destroy" target="_self"&gt;FeatureLayer.destroy()&lt;/A&gt; - if you want to destroy the reference to the layer and free up the memory. The layer and any associated resources no longer exist.&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Thu, 08 Aug 2024 12:28:54 GMT</pubDate>
    <dc:creator>Sage_Wall</dc:creator>
    <dc:date>2024-08-08T12:28:54Z</dc:date>
    <item>
      <title>Delete Cluster Layers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/delete-cluster-layers/m-p/1516511#M85250</link>
      <description>&lt;P&gt;I have some Javascript code that creates three cluster layers.&lt;/P&gt;&lt;P&gt;I need to be able to clear the three layers (&lt;SPAN&gt;workLayer&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;educationLayer&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;volunteerLayer) when I start a new process but can't figure out the right function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is what I have but it leaves the layers / graphics there.&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;function&lt;/SPAN&gt; &lt;SPAN&gt;clearLayers&lt;/SPAN&gt;&lt;SPAN&gt;() {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [&lt;/SPAN&gt;&lt;SPAN&gt;workLayer&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;educationLayer&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;volunteerLayer&lt;/SPAN&gt;&lt;SPAN&gt;].&lt;/SPAN&gt;&lt;SPAN&gt;forEach&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;layer&lt;/SPAN&gt; &lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;layer&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;source&lt;/SPAN&gt;&lt;SPAN&gt;) { &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;layer&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;source&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;remove&lt;/SPAN&gt;&lt;SPAN&gt;() &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 06:06:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/delete-cluster-layers/m-p/1516511#M85250</guid>
      <dc:creator>LIZDean</dc:creator>
      <dc:date>2024-08-08T06:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Cluster Layers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/delete-cluster-layers/m-p/1516622#M85255</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/797548"&gt;@LIZDean&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#applyEdits" target="_self"&gt;FeatureLayer.applyEdits()&lt;/A&gt; - if you want to delete the features but leave the layers for later use&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#removeMany" target="_self"&gt;Map.removeMany()&lt;/A&gt; - if you want to remove the layer from the map but maybe readd it again&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#destroy" target="_self"&gt;FeatureLayer.destroy()&lt;/A&gt; - if you want to destroy the reference to the layer and free up the memory. The layer and any associated resources no longer exist.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 08 Aug 2024 12:28:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/delete-cluster-layers/m-p/1516622#M85255</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2024-08-08T12:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Cluster Layers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/delete-cluster-layers/m-p/1517052#M85264</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/507049"&gt;@Sage_Wall&lt;/a&gt;&amp;nbsp;I will give them a go &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 23:26:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/delete-cluster-layers/m-p/1517052#M85264</guid>
      <dc:creator>LIZDean</dc:creator>
      <dc:date>2024-08-08T23:26:45Z</dc:date>
    </item>
  </channel>
</rss>

