<?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: Removing old point cluster graphic in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-old-point-cluster-graphic/m-p/189456#M17536</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The cluster layer should be handling this for you, meaning that you shouldn't have to manually manage cluster graphics. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Clusters should be removed and regenerated when the map's zoom level changes. Is that not working for you?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Apr 2013 15:39:02 GMT</pubDate>
    <dc:creator>derekswingley1</dc:creator>
    <dc:date>2013-04-23T15:39:02Z</dc:date>
    <item>
      <title>Removing old point cluster graphic</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-old-point-cluster-graphic/m-p/189455#M17535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks to Derek's excellent example last week of using point clustering on a feature map, I've been able to implement this function into a map I'm developing. The only problem I can't figure out is how to dismiss an old point cluster and get a new one generated. I've looked at the ClusterLayer.js and saw a function called clear so I added that to my code ... clusterLayer.clear(). The cluster graphic gets removed but a new cluster graphic isn't generated. I just have a blank map with no clusters. I know I have values available for clustering because when I do a clusterLayer.length, I get a count of the records found.&amp;nbsp; It just won't generate a new cluster graphic. Has anyone tried to dismiss an old cluster graphic and get a new one?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 14:10:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-old-point-cluster-graphic/m-p/189455#M17535</guid>
      <dc:creator>BetsySchenck-Gardner</dc:creator>
      <dc:date>2013-04-23T14:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Removing old point cluster graphic</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-old-point-cluster-graphic/m-p/189456#M17536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The cluster layer should be handling this for you, meaning that you shouldn't have to manually manage cluster graphics. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Clusters should be removed and regenerated when the map's zoom level changes. Is that not working for you?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 15:39:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-old-point-cluster-graphic/m-p/189456#M17536</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2013-04-23T15:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Removing old point cluster graphic</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-old-point-cluster-graphic/m-p/189457#M17537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The cluster layer should be handling this for you, meaning that you shouldn't have to manually manage cluster graphics. &lt;BR /&gt;&lt;BR /&gt;Clusters should be removed and regenerated when the map's zoom level changes. Is that not working for you?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The clusters are regenerated when I change my map's zoom level.&amp;nbsp; My issue lies in having a new query result.&amp;nbsp; For example, in my map, the user can enter the name of a species and the query task will come back with those results clustered. If the user enters a new query for a different species, the results come back but they aren't being displayed at all ... not as clusters or anything else. The old cluster results are still being displayed on the map.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 16:21:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-old-point-cluster-graphic/m-p/189457#M17537</guid>
      <dc:creator>BetsySchenck-Gardner</dc:creator>
      <dc:date>2013-04-23T16:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Removing old point cluster graphic</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-old-point-cluster-graphic/m-p/189458#M17538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The clusters are regenerated when I change my map's zoom level.&amp;nbsp; My issue lies in having a new query result.&amp;nbsp; For example, in my map, the user can enter the name of a species and the query task will come back with those results clustered. If the user enters a new query for a different species, the results come back but they aren't being displayed at all ... not as clusters or anything else. The old cluster results are still being displayed on the map.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I understand, that's a slightly different issue. The cluster layer as-is expects all data initially and isn't set up to have new data continuously pushed in. One option would be to remove the cluster layer, destroy it and then create a new cluster layer when new data is available. It might also be possible to re-cluster on the fly, but I haven't looked at that code in a while so I'm not certain that re-clustering would be easy without changing some of the cluster layer's methods.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 17:28:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-old-point-cluster-graphic/m-p/189458#M17538</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2013-04-23T17:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Removing old point cluster graphic</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-old-point-cluster-graphic/m-p/189459#M17539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I understand, that's a slightly different issue. The cluster layer as-is expects all data initially and isn't set up to have new data continuously pushed in. One option would be to remove the cluster layer, destroy it and then create a new cluster layer when new data is available. It might also be possible to re-cluster on the fly, but I haven't looked at that code in a while so I'm not certain that re-clustering would be easy without changing some of the cluster layer's methods.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Well finally figured it out. Instead of using clusterLayer.clear() which removed the cluster graphics but didn't allow for a new clustering of data, I used map.removeLayer(clusterLayer). That removed the graphic and allowed a new cluster to be generated. Thanks for your help Derek.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 17:57:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-old-point-cluster-graphic/m-p/189459#M17539</guid>
      <dc:creator>BetsySchenck-Gardner</dc:creator>
      <dc:date>2013-04-23T17:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: Removing old point cluster graphic</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-old-point-cluster-graphic/m-p/189460#M17540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Glad you got it sorted out!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 18:35:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-old-point-cluster-graphic/m-p/189460#M17540</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2013-04-23T18:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Removing old point cluster graphic</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-old-point-cluster-graphic/m-p/189461#M17541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I added the following public function to ClusterLayer.js:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;refreshData: function(data) {
&amp;nbsp; this.clear();
&amp;nbsp; this._clusterData = data;
&amp;nbsp; this._clusterGraphics();
},&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This permits you to refresh the data set and generate a new set of clusters. Now you don't need to destroy and re-create the cluster layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If the upper limit of the cluster layer's last renderer break is not set to "Infinity" you might need to delete and re-create the last break in the renderer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:32:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-old-point-cluster-graphic/m-p/189461#M17541</guid>
      <dc:creator>TyroneLigon</dc:creator>
      <dc:date>2021-12-11T09:32:45Z</dc:date>
    </item>
  </channel>
</rss>

