<?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: How to cluster graphics in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-cluster-graphics/m-p/49813#M4388</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I played with this a little but didn't take it too far. I used it in an app that uses web mercator base maps. Maybe someone will find this helpful:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://swingley.appspot.com/phish"&gt;http://swingley.appspot.com/phish&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Mar 2011 22:54:51 GMT</pubDate>
    <dc:creator>derekswingley1</dc:creator>
    <dc:date>2011-03-24T22:54:51Z</dc:date>
    <item>
      <title>How to cluster graphics</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-cluster-graphics/m-p/49809#M4384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am drawing hundreds of graphics (points) on a map and it's too slow in IE -- I get the alert asking if you want to stop the script. So I want to cluster the points and draw one for each set that falls within a certain offset. Are there libs and /or techniques readily available for doing this, or do I have to write it myself? I can see it wouldn't be too difficult to do the clustering but then the graphics need to have an infoWindow, so when clicking on a clustered point I need to display the option to view the attributes for each real data point.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2011 12:39:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-cluster-graphics/m-p/49809#M4384</guid>
      <dc:creator>JamesBurton</dc:creator>
      <dc:date>2011-03-18T12:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to cluster graphics</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-cluster-graphics/m-p/49810#M4385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There's obviously more to clustering than I imagined and I'm glad to have found this clustering lib: &lt;/SPAN&gt;&lt;A href="http://www.arcgis.com/home/item.html?id=c546bc8d4f0b4c0fbdf149b92223e681"&gt;http://www.arcgis.com/home/item.html?id=c546bc8d4f0b4c0fbdf149b92223e681&lt;/A&gt;&lt;SPAN&gt; . I have a problem though -- When I create a clusterLayer I get this alert:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Input Spatial Reference Must Be in Either WKID: 102110 or WKID: 4326&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My graphics have got the same spatialReference as the map, which the docs say should be OK. Anyone know why this is?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2011 13:13:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-cluster-graphics/m-p/49810#M4385</guid>
      <dc:creator>JamesBurton</dc:creator>
      <dc:date>2011-03-18T13:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to cluster graphics</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-cluster-graphics/m-p/49811#M4386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi James,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I still haven't gotten this sample code to work 100%, but it looks promising.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found I needed to make a change in the code, which was hard-coded to expect certain spatial references (despite the mention in the text of supporting multiple spatial references).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my case I made this change to work with my known spatial reference of 102113:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;//this function may not be needed exactly as is below.&amp;nbsp; somehow, the attributes need to be mapped to the points.
&amp;nbsp;&amp;nbsp;&amp;nbsp; setFeatures: function(features) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this._features = [];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var wkid = features[0].geometry.spatialReference.wkid;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (wkid != 102113) {
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let us all know how you go with the clustering - I'd love to see a real-world example in action. I hope to deploy it soon on my own site.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:55:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-cluster-graphics/m-p/49811#M4386</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2021-12-10T21:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to cluster graphics</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-cluster-graphics/m-p/49812#M4387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I haven't got the code to work either. The query is not drawing anything. Wonder if anyone else has got this working?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Joy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2011 22:28:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-cluster-graphics/m-p/49812#M4387</guid>
      <dc:creator>JoyC</dc:creator>
      <dc:date>2011-03-24T22:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to cluster graphics</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-cluster-graphics/m-p/49813#M4388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I played with this a little but didn't take it too far. I used it in an app that uses web mercator base maps. Maybe someone will find this helpful:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://swingley.appspot.com/phish"&gt;http://swingley.appspot.com/phish&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2011 22:54:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-cluster-graphics/m-p/49813#M4388</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2011-03-24T22:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to cluster graphics</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-cluster-graphics/m-p/49814#M4389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We've updated our site to use the clustering sample - see &lt;/SPAN&gt;&lt;A href="http://atlas.nsw.gov.au/public/nsw/home/map/national-parks.html"&gt;http://atlas.nsw.gov.au/public/nsw/home/map/national-parks.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I had to make some tweaks to the sample clustering script, to avoid the infoWindow flicking on/off on mouse hover, but otherwise I'm pretty happy with the way it works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if you have any questions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2011 03:13:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-cluster-graphics/m-p/49814#M4389</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2011-06-01T03:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to cluster graphics</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-cluster-graphics/m-p/49815#M4390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;esri adds new sample with 3.0: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/layers_point_clustering.html"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/layers_point_clustering.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2012 10:37:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-cluster-graphics/m-p/49815#M4390</guid>
      <dc:creator>nicogis</dc:creator>
      <dc:date>2012-06-19T10:37:50Z</dc:date>
    </item>
  </channel>
</rss>

