<?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 do I highlight a cluster with a feature query? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-highlight-a-cluster-with-a-feature-query/m-p/1215512#M78795</link>
    <description>&lt;P&gt;I would love to know if that is possible too&lt;/P&gt;</description>
    <pubDate>Fri, 23 Sep 2022 14:20:50 GMT</pubDate>
    <dc:creator>FabricioBezerra</dc:creator>
    <dc:date>2022-09-23T14:20:50Z</dc:date>
    <item>
      <title>How do I highlight a cluster with a feature query?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-highlight-a-cluster-with-a-feature-query/m-p/255472#M23718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to highlight a cluster by using the queryFeatures method on a GeoJSON layer, but only the children of the cluster are highlighted when I turn off the marker clustering.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using a Sketch widget to highlight only items in the selected area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can the clusters be highlighted instead of the children?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;sketch.on("create", function(event) {&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;if (event.state === "complete") {&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;selectFeatures(event.graphic.geometry);&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;}&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var highlight;&lt;BR /&gt;function selectFeatures(geometry){&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;// remove the first sketch shape if it exists&lt;BR /&gt; if(sketchLayer.graphics.items.length &amp;gt; 1){&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;var firstItem = sketchLayer.graphics.items[0];&lt;BR /&gt; sketchLayer.graphics.remove(firstItem);&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;}&lt;BR /&gt; // remove the current highlight if set&lt;BR /&gt; if(&lt;SPAN style="background-color: #f6f6f6;"&gt;highlight&lt;/SPAN&gt;){&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;highlight&lt;/SPAN&gt;.remove();&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;}&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;BR /&gt; // query&lt;BR /&gt; view.whenLayerView(&lt;SPAN style="background-color: #f6f6f6;"&gt;layer&lt;/SPAN&gt;).then(function(layerView){&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;var query = layer.createQuery();&lt;BR /&gt; query.geometry = geometry;&lt;BR /&gt; query.returnGeometry = true;&lt;BR /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;layer&lt;/SPAN&gt;.queryFeatures(query).then(function(result){&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;highlight&amp;nbsp;= layerView.highlight(result.features); &lt;SPAN style="color: #ff0000;"&gt;// clusters are not highlighted here, only the children&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;});&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;});&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2020 11:42:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-highlight-a-cluster-with-a-feature-query/m-p/255472#M23718</guid>
      <dc:creator>KDimitrov</dc:creator>
      <dc:date>2020-08-05T11:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I highlight a cluster with a feature query?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-highlight-a-cluster-with-a-feature-query/m-p/255473#M23719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anybody?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2020 21:41:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-highlight-a-cluster-with-a-feature-query/m-p/255473#M23719</guid>
      <dc:creator>KDimitrov</dc:creator>
      <dc:date>2020-08-10T21:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do I highlight a cluster with a feature query?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-highlight-a-cluster-with-a-feature-query/m-p/1215512#M78795</link>
      <description>&lt;P&gt;I would love to know if that is possible too&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 14:20:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-highlight-a-cluster-with-a-feature-query/m-p/1215512#M78795</guid>
      <dc:creator>FabricioBezerra</dc:creator>
      <dc:date>2022-09-23T14:20:50Z</dc:date>
    </item>
  </channel>
</rss>

