<?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: get clusters from clusterer in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-clusters-from-clusterer/m-p/33389#M803</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you iterate over the graphics in the graphics layer, the clusters are instances of ClusterGraphic. See:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/clusterers/supportClasses/ClusterGraphic.html"&gt;http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/clusterers/supportClasses/ClusterGraphic.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Dec 2011 23:08:36 GMT</pubDate>
    <dc:creator>DasaPaddock</dc:creator>
    <dc:date>2011-12-13T23:08:36Z</dc:date>
    <item>
      <title>get clusters from clusterer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-clusters-from-clusterer/m-p/33388#M802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How do you get the clusters from a clusterer....to determine if certain graphics are within a cluster or not?&amp;nbsp; GraphicsLayer and Clusterer do not have a property or method to get the clusters currently drawn.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2011 13:35:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-clusters-from-clusterer/m-p/33388#M802</guid>
      <dc:creator>JamesSchlafley</dc:creator>
      <dc:date>2011-12-12T13:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: get clusters from clusterer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-clusters-from-clusterer/m-p/33389#M803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you iterate over the graphics in the graphics layer, the clusters are instances of ClusterGraphic. See:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/clusterers/supportClasses/ClusterGraphic.html"&gt;http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/clusterers/supportClasses/ClusterGraphic.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2011 23:08:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-clusters-from-clusterer/m-p/33389#M803</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2011-12-13T23:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: get clusters from clusterer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-clusters-from-clusterer/m-p/33390#M804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you tried this?&amp;nbsp; I looped over all graphics in a graphicsLayer and they all returned as "Graphic" with the following statement...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alert.show(flash.utils.getQualifiedClassName(myGraphicsLayer.graphicProvider&lt;J&gt;).toString());&lt;/J&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I expected this to return "ClusterGraphic" for some of the graphics.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2011 01:16:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-clusters-from-clusterer/m-p/33390#M804</guid>
      <dc:creator>JamesSchlafley</dc:creator>
      <dc:date>2011-12-14T01:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: get clusters from clusterer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-clusters-from-clusterer/m-p/33391#M805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The graphicProvider is unaffected by the clustering.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for (var i:int = 0, n:int = myGraphicsLayer.numChildren; i &amp;lt; n; i++) 
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; var graphic:Graphic = myGraphicsLayer.getChildAt(i) as Graphic;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (graphic is ClusterGraphic)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trace(graphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:18:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-clusters-from-clusterer/m-p/33391#M805</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2021-12-10T21:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: get clusters from clusterer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-clusters-from-clusterer/m-p/33392#M806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;One thing you can do is to subclass Symbol and add additional listeners in the draw method (but make sure you also remove them in the clear method).&amp;nbsp; I started with Mansour's attribute clusterer found &lt;/SPAN&gt;&lt;A href="http://thunderhead.esri.com/readonlyurl/ClusterApp/srcview/"&gt;here&lt;/A&gt;&lt;SPAN&gt;. In the AttrClusterSymbol.as draw method, you can add:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;override public function draw(sprite:Sprite, geometry:Geometry, attributes:Object, map:Map):void&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; const clusterGraphic:ClusterGraphic = sprite as ClusterGraphic;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; clusterGraphic.addEventListener(MouseEvent.ROLL_OVER, graphicRollOverHandler);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; clusterGraphic.addEventListener(MouseEvent.ROLL_OUT, graphicRollOutHandler);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; clusterGraphic.addEventListener(MouseEvent.CLICK, graphicClickHandler);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;........&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;you can then get the cluster.graphics off of the clusterGraphic when the user interacts with it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not sure if this will solve your problem, but it work well for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Again, just remember to remove these listeners in the clear method so don't you have crazy leaks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Brendan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2012 15:39:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-clusters-from-clusterer/m-p/33392#M806</guid>
      <dc:creator>BrendanCollins</dc:creator>
      <dc:date>2012-01-06T15:39:52Z</dc:date>
    </item>
  </channel>
</rss>

