<?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: Dynamic Clustering in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamic-clustering/m-p/372730#M34583</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;A href="http://plnkr.co/edit/a2nKNFWQM0R7U8BOvJnl?p=preview"&gt;http://plnkr.co/edit/a2nKNFWQM0R7U8BOvJnl?p=preview&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've got it only updating the cluster points that are relevant now, but the lag when the marker is redrawn really stinks.&amp;nbsp; Hopefully someone can answer my questions above re:TextSymbol.setText/Point.update and point me in the right direction.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I had tot get rid of the ClassBreaksRenderer, because I wasn't sure how to get it to update when a marker moved.&amp;nbsp; It looks like the original code was trying to get it to update, but it didn't work post-render (referring to _updateClusterGeometry()).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, the graphic is being requested from the server each time the layer is rendered.&amp;nbsp; Is there a way to cache this?&amp;nbsp; I tried storing the instance of PictureMarkerSymbol locally, but that didn't work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PS: The code is really nasty (lots of copy/paste).&amp;nbsp; I plan on cleaning it up before actually using it, so at some point I'll reply with a cleaned up ClusterLayer.js.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Apr 2013 14:27:26 GMT</pubDate>
    <dc:creator>LangdonOliver</dc:creator>
    <dc:date>2013-04-26T14:27:26Z</dc:date>
    <item>
      <title>Dynamic Clustering</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamic-clustering/m-p/372728#M34581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In looking at the ClusterLayer example and reading the forums, I gather that it was strictly written to handle a single chunk of static data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, in playing around with it, it seems that it is partially capable of handling dynamic data:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 1. Preview this: &lt;/SPAN&gt;&lt;A href="http://plnkr.co/edit/NnWEBtpzllEZmwngSkX9?p=preview"&gt;http://plnkr.co/edit/NnWEBtpzllEZmwngSkX9?p=preview&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt; 2. Zoom out a few levels when you can and see how the existing clusters change&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 3. Also see the console ("didn't find exactly one LABEL:&amp;nbsp; []")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So it seems that:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 1. If there's an existing cluster available, the point will be added to it&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 2. If no suitable cluster exists, and no interfering point has been created, one will be created&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 3. If an interfering point exists (and there's no existing cluster) it throws that error about ("didn't find exactly one LABEL:&amp;nbsp; []");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I made some super simple modifications to get dynamic adding/removing/clearing of points here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; - &lt;/SPAN&gt;&lt;A href="http://plnkr.co/edit/a2nKNFWQM0R7U8BOvJnl?p=preview"&gt;http://plnkr.co/edit/a2nKNFWQM0R7U8BOvJnl?p=preview&lt;/A&gt;&lt;SPAN&gt; (overwritten with new changes)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But having to redraw the points each time an add/remove/clear action occurs isn't optimal.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone spent some time tweaking ClusterLayers to get this kind of functionality without the redraw effect?&amp;nbsp; I'm going to attempt to do it, but I'd rather save myself the pain if someone else has already done so.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;TIA!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 18:44:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamic-clustering/m-p/372728#M34581</guid>
      <dc:creator>LangdonOliver</dc:creator>
      <dc:date>2013-04-25T18:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Clustering</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamic-clustering/m-p/372729#M34582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've dug into this a little deeper, and I'm still having to remove/re-add cluster layers that are affected by points being added/removed from them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I assume this is by design and that &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/textsymbol.html#setText"&gt;TextSymbol::setText()&lt;/A&gt;&lt;SPAN&gt; is just setting the text on the object, and not updating the map?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And same for &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/point.html#update"&gt;Point::update()&lt;/A&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 12:38:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamic-clustering/m-p/372729#M34582</guid>
      <dc:creator>LangdonOliver</dc:creator>
      <dc:date>2013-04-26T12:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Clustering</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamic-clustering/m-p/372730#M34583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;A href="http://plnkr.co/edit/a2nKNFWQM0R7U8BOvJnl?p=preview"&gt;http://plnkr.co/edit/a2nKNFWQM0R7U8BOvJnl?p=preview&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've got it only updating the cluster points that are relevant now, but the lag when the marker is redrawn really stinks.&amp;nbsp; Hopefully someone can answer my questions above re:TextSymbol.setText/Point.update and point me in the right direction.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I had tot get rid of the ClassBreaksRenderer, because I wasn't sure how to get it to update when a marker moved.&amp;nbsp; It looks like the original code was trying to get it to update, but it didn't work post-render (referring to _updateClusterGeometry()).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, the graphic is being requested from the server each time the layer is rendered.&amp;nbsp; Is there a way to cache this?&amp;nbsp; I tried storing the instance of PictureMarkerSymbol locally, but that didn't work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PS: The code is really nasty (lots of copy/paste).&amp;nbsp; I plan on cleaning it up before actually using it, so at some point I'll reply with a cleaned up ClusterLayer.js.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 14:27:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/dynamic-clustering/m-p/372730#M34583</guid>
      <dc:creator>LangdonOliver</dc:creator>
      <dc:date>2013-04-26T14:27:26Z</dc:date>
    </item>
  </channel>
</rss>

