<?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 Point Clustering - changing query won't update map in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-clustering-changing-query-won-t-update-map/m-p/321277#M29569</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;based on the modified &lt;A href="https://developers.arcgis.com/javascript/3/jssamples/layers_point_clustering.html"&gt;esri example&lt;/A&gt; for clustering points I found on GitHub at&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/Esri/cluster-layer-js" title="https://github.com/Esri/cluster-layer-js"&gt;GitHub - Esri/cluster-layer-js: One example of how to cluster many point features&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;I'm trying to figure out how to update the map when the&amp;nbsp;query changes.&lt;/P&gt;&lt;P&gt;For example, I have a map that shows all 2016 traffic accidents. Everything works fine, points are clustering, etc.. The user should have the option to show only non-injury accidents with the click of a checkbox or button. The query works, but the map still displays all points, regardless of the used (changed) query.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't figure out how to redraw/re-create the clusterfeaturelayer and show only non-injury accidents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Thanks for your help!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marc Seliger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Jan 2017 18:13:54 GMT</pubDate>
    <dc:creator>South_JordanCity_of</dc:creator>
    <dc:date>2017-01-23T18:13:54Z</dc:date>
    <item>
      <title>Point Clustering - changing query won't update map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-clustering-changing-query-won-t-update-map/m-p/321277#M29569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;based on the modified &lt;A href="https://developers.arcgis.com/javascript/3/jssamples/layers_point_clustering.html"&gt;esri example&lt;/A&gt; for clustering points I found on GitHub at&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/Esri/cluster-layer-js" title="https://github.com/Esri/cluster-layer-js"&gt;GitHub - Esri/cluster-layer-js: One example of how to cluster many point features&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;I'm trying to figure out how to update the map when the&amp;nbsp;query changes.&lt;/P&gt;&lt;P&gt;For example, I have a map that shows all 2016 traffic accidents. Everything works fine, points are clustering, etc.. The user should have the option to show only non-injury accidents with the click of a checkbox or button. The query works, but the map still displays all points, regardless of the used (changed) query.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't figure out how to redraw/re-create the clusterfeaturelayer and show only non-injury accidents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Thanks for your help!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marc Seliger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2017 18:13:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-clustering-changing-query-won-t-update-map/m-p/321277#M29569</guid>
      <dc:creator>South_JordanCity_of</dc:creator>
      <dc:date>2017-01-23T18:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Point Clustering - changing query won't update map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-clustering-changing-query-won-t-update-map/m-p/321278#M29570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marc, how are you updating the query? &amp;nbsp;I've only found that it can be done by setting the private attribute "_where" like for a layer definition query and then the cluster graphics layer does not respond to the redraw() function like it should but updates on a map extent change event. &amp;nbsp;It also does not want to respond to setting the layer definition query back to the original where clause.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2017 10:24:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-clustering-changing-query-won-t-update-map/m-p/321278#M29570</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2017-01-24T10:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: Point Clustering - changing query won't update map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-clustering-changing-query-won-t-update-map/m-p/321279#M29571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And let's tag the developer &lt;A href="https://community.esri.com/people/alaframboise-esristaff"&gt;alaframboise-esristaff&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2017 10:38:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-clustering-changing-query-won-t-update-map/m-p/321279#M29571</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2017-01-24T10:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: Point Clustering - changing query won't update map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-clustering-changing-query-won-t-update-map/m-p/321280#M29572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems that it works now for me, but I ended up with a slightly different version of the clustering. Basically, I have a bunch of check boxes that determine the query and pass the queryText to the runQuery function.&amp;nbsp;I also declared the clusterLayer as a global variable. The key was to remove the clusterLayer from the map&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;removeLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;clusterLayer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and then call the runQuery function again. This might not be the most elegant coding, but at least it works now. More fine tuning is required regarding icons, map layout, etc...&lt;/P&gt;&lt;P&gt;All files are attached in the zip file.&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2017 14:53:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-clustering-changing-query-won-t-update-map/m-p/321280#M29572</guid>
      <dc:creator>South_JordanCity_of</dc:creator>
      <dc:date>2017-01-25T14:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Point Clustering - changing query won't update map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-clustering-changing-query-won-t-update-map/m-p/321281#M29573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;..and something is still screwy with the pop-ups (can't close it), I'm still working on it....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2017 14:56:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-clustering-changing-query-won-t-update-map/m-p/321281#M29573</guid>
      <dc:creator>South_JordanCity_of</dc:creator>
      <dc:date>2017-01-25T14:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Point Clustering - changing query won't update map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-clustering-changing-query-won-t-update-map/m-p/321282#M29574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok, after changing all esri file versions to 3.19, the pop-ups are now behaving as they should. Initially, the versions differed (3.19 and&amp;nbsp;3.11)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2017 15:10:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-clustering-changing-query-won-t-update-map/m-p/321282#M29574</guid>
      <dc:creator>South_JordanCity_of</dc:creator>
      <dc:date>2017-01-25T15:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: Point Clustering - changing query won't update map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-clustering-changing-query-won-t-update-map/m-p/321283#M29575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here's a working example:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://gis.southjordanutah.gov/police/accidents/2017/" title="http://gis.southjordanutah.gov/police/accidents/"&gt;Cluster&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;however, if you look at the console, i get the error&lt;/P&gt;&lt;P&gt;svg.js:43 Error: &amp;lt;circle&amp;gt; attribute cx: Expected length, "NaN".&lt;/P&gt;&lt;P&gt;this is because the map draws over 1000 features. If I take out the non-injury accidents, the error disappears, but I have no idea how to fix it.&lt;/P&gt;&lt;P&gt;any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jan 2017 16:22:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/point-clustering-changing-query-won-t-update-map/m-p/321283#M29575</guid>
      <dc:creator>South_JordanCity_of</dc:creator>
      <dc:date>2017-01-25T16:22:37Z</dc:date>
    </item>
  </channel>
</rss>

