<?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 Rendering feature attribute when cluster goes to one in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/rendering-feature-attribute-when-cluster-goes-to/m-p/1611748#M87087</link>
    <description>&lt;P&gt;I have a layer of features, and I want to cluster them. I have the cluster set up and originally had a renderer using CIMSymbol to display the name of the feature, along with an icon.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However when I cluster, it shows the number and also the name below the cluster. I would like to only show the feature value when the cluster size is 1.&lt;/P&gt;&lt;P&gt;I tried some where clauses in the labelingInfo array, but that didn't render anything:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;const &lt;/SPAN&gt;&lt;SPAN&gt;workerClusterConfig &lt;/SPAN&gt;= {&lt;BR /&gt;    &lt;SPAN&gt;type&lt;/SPAN&gt;: &lt;SPAN&gt;"cluster"&lt;/SPAN&gt;,&lt;BR /&gt;    &lt;SPAN&gt;clusterRadius&lt;/SPAN&gt;: &lt;SPAN&gt;"100px"&lt;/SPAN&gt;,&lt;BR /&gt;    &lt;SPAN&gt;// {cluster_count} is an aggregate field containing&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    // the number of features comprised by the cluster&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;popupTemplate&lt;/SPAN&gt;: {&lt;BR /&gt;        &lt;SPAN&gt;title&lt;/SPAN&gt;: &lt;SPAN&gt;"Cluster summary"&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;content&lt;/SPAN&gt;: &lt;SPAN&gt;"This cluster represents {cluster_count} workers."&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;fieldInfos&lt;/SPAN&gt;: [{&lt;BR /&gt;            &lt;SPAN&gt;fieldName&lt;/SPAN&gt;: &lt;SPAN&gt;"cluster_count"&lt;/SPAN&gt;,&lt;BR /&gt;            &lt;SPAN&gt;format&lt;/SPAN&gt;: {&lt;BR /&gt;                &lt;SPAN&gt;places&lt;/SPAN&gt;: &lt;SPAN&gt;0&lt;/SPAN&gt;,&lt;BR /&gt;                &lt;SPAN&gt;digitSeparator&lt;/SPAN&gt;: &lt;SPAN&gt;true&lt;BR /&gt;&lt;/SPAN&gt;            }&lt;BR /&gt;        }]&lt;BR /&gt;    },&lt;BR /&gt;    &lt;SPAN&gt;clusterMinSize&lt;/SPAN&gt;: &lt;SPAN&gt;"50px"&lt;/SPAN&gt;,&lt;BR /&gt;    &lt;SPAN&gt;clusterMaxSize&lt;/SPAN&gt;: &lt;SPAN&gt;"50px"&lt;/SPAN&gt;,&lt;BR /&gt;    &lt;SPAN&gt;labelingInfo&lt;/SPAN&gt;: [{&lt;BR /&gt;        &lt;SPAN&gt;labelExpressionInfo&lt;/SPAN&gt;: {&lt;BR /&gt;            &lt;SPAN&gt;expression&lt;/SPAN&gt;: &lt;SPAN&gt;"$feature.cluster_count"&lt;BR /&gt;&lt;/SPAN&gt;        },&lt;BR /&gt;        &lt;SPAN&gt;labelPlacement&lt;/SPAN&gt;: &lt;SPAN&gt;"center-center"&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;deconflictionStrategy&lt;/SPAN&gt;: &lt;SPAN&gt;"none"&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;where&lt;/SPAN&gt;: &lt;SPAN&gt;`$feature.cluster_count &amp;gt; 1`&lt;BR /&gt;&lt;/SPAN&gt;    },{&lt;BR /&gt;        &lt;SPAN&gt;labelExpressionInfo&lt;/SPAN&gt;: {&lt;BR /&gt;            &lt;SPAN&gt;expression&lt;/SPAN&gt;: &lt;SPAN&gt;"$feature.name"&lt;BR /&gt;&lt;/SPAN&gt;        },&lt;BR /&gt;        &lt;SPAN&gt;labelPlacement&lt;/SPAN&gt;: &lt;SPAN&gt;"below-center"&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;deconflictionStrategy&lt;/SPAN&gt;: &lt;SPAN&gt;"none"&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;where&lt;/SPAN&gt;: &lt;SPAN&gt;`$feature.cluster_count &amp;lt; 2`&lt;BR /&gt;&lt;/SPAN&gt;    },]&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;I am assuming that cluster_count is a number, and that the layer renderer cannot access it. Do I need to move my entire layer renderer down into the cluster render? Do I need a completely different renderer?&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 05 May 2025 18:41:29 GMT</pubDate>
    <dc:creator>ChaosSteve</dc:creator>
    <dc:date>2025-05-05T18:41:29Z</dc:date>
    <item>
      <title>Rendering feature attribute when cluster goes to one</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/rendering-feature-attribute-when-cluster-goes-to/m-p/1611748#M87087</link>
      <description>&lt;P&gt;I have a layer of features, and I want to cluster them. I have the cluster set up and originally had a renderer using CIMSymbol to display the name of the feature, along with an icon.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However when I cluster, it shows the number and also the name below the cluster. I would like to only show the feature value when the cluster size is 1.&lt;/P&gt;&lt;P&gt;I tried some where clauses in the labelingInfo array, but that didn't render anything:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;const &lt;/SPAN&gt;&lt;SPAN&gt;workerClusterConfig &lt;/SPAN&gt;= {&lt;BR /&gt;    &lt;SPAN&gt;type&lt;/SPAN&gt;: &lt;SPAN&gt;"cluster"&lt;/SPAN&gt;,&lt;BR /&gt;    &lt;SPAN&gt;clusterRadius&lt;/SPAN&gt;: &lt;SPAN&gt;"100px"&lt;/SPAN&gt;,&lt;BR /&gt;    &lt;SPAN&gt;// {cluster_count} is an aggregate field containing&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    // the number of features comprised by the cluster&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;popupTemplate&lt;/SPAN&gt;: {&lt;BR /&gt;        &lt;SPAN&gt;title&lt;/SPAN&gt;: &lt;SPAN&gt;"Cluster summary"&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;content&lt;/SPAN&gt;: &lt;SPAN&gt;"This cluster represents {cluster_count} workers."&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;fieldInfos&lt;/SPAN&gt;: [{&lt;BR /&gt;            &lt;SPAN&gt;fieldName&lt;/SPAN&gt;: &lt;SPAN&gt;"cluster_count"&lt;/SPAN&gt;,&lt;BR /&gt;            &lt;SPAN&gt;format&lt;/SPAN&gt;: {&lt;BR /&gt;                &lt;SPAN&gt;places&lt;/SPAN&gt;: &lt;SPAN&gt;0&lt;/SPAN&gt;,&lt;BR /&gt;                &lt;SPAN&gt;digitSeparator&lt;/SPAN&gt;: &lt;SPAN&gt;true&lt;BR /&gt;&lt;/SPAN&gt;            }&lt;BR /&gt;        }]&lt;BR /&gt;    },&lt;BR /&gt;    &lt;SPAN&gt;clusterMinSize&lt;/SPAN&gt;: &lt;SPAN&gt;"50px"&lt;/SPAN&gt;,&lt;BR /&gt;    &lt;SPAN&gt;clusterMaxSize&lt;/SPAN&gt;: &lt;SPAN&gt;"50px"&lt;/SPAN&gt;,&lt;BR /&gt;    &lt;SPAN&gt;labelingInfo&lt;/SPAN&gt;: [{&lt;BR /&gt;        &lt;SPAN&gt;labelExpressionInfo&lt;/SPAN&gt;: {&lt;BR /&gt;            &lt;SPAN&gt;expression&lt;/SPAN&gt;: &lt;SPAN&gt;"$feature.cluster_count"&lt;BR /&gt;&lt;/SPAN&gt;        },&lt;BR /&gt;        &lt;SPAN&gt;labelPlacement&lt;/SPAN&gt;: &lt;SPAN&gt;"center-center"&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;deconflictionStrategy&lt;/SPAN&gt;: &lt;SPAN&gt;"none"&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;where&lt;/SPAN&gt;: &lt;SPAN&gt;`$feature.cluster_count &amp;gt; 1`&lt;BR /&gt;&lt;/SPAN&gt;    },{&lt;BR /&gt;        &lt;SPAN&gt;labelExpressionInfo&lt;/SPAN&gt;: {&lt;BR /&gt;            &lt;SPAN&gt;expression&lt;/SPAN&gt;: &lt;SPAN&gt;"$feature.name"&lt;BR /&gt;&lt;/SPAN&gt;        },&lt;BR /&gt;        &lt;SPAN&gt;labelPlacement&lt;/SPAN&gt;: &lt;SPAN&gt;"below-center"&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;deconflictionStrategy&lt;/SPAN&gt;: &lt;SPAN&gt;"none"&lt;/SPAN&gt;,&lt;BR /&gt;        &lt;SPAN&gt;where&lt;/SPAN&gt;: &lt;SPAN&gt;`$feature.cluster_count &amp;lt; 2`&lt;BR /&gt;&lt;/SPAN&gt;    },]&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;I am assuming that cluster_count is a number, and that the layer renderer cannot access it. Do I need to move my entire layer renderer down into the cluster render? Do I need a completely different renderer?&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 05 May 2025 18:41:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/rendering-feature-attribute-when-cluster-goes-to/m-p/1611748#M87087</guid>
      <dc:creator>ChaosSteve</dc:creator>
      <dc:date>2025-05-05T18:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: Rendering feature attribute when cluster goes to one</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/rendering-feature-attribute-when-cluster-goes-to/m-p/1612238#M87096</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Do you mind verifying if I have your set up correctly summarized here?&lt;/P&gt;&lt;P&gt;1. You have a layer, rendered with a CIMSymbol in a&amp;nbsp; SimpleRenderer. This symbol contains a TextSymbolLayer to display the name of the feature (I'm guessing by using a primitive override).&lt;/P&gt;&lt;P&gt;2. When you enable featureReduction on the layer, the same symbol is used for the clusters, including the text displaying the feature name. A LabelClass is also generated for the cluster configuration which returns the cluster count in the center of the symbol.&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Individual features display as expected...using the CIM Symbol with the text symbol layer indicating the feature name.&amp;nbsp;&lt;/P&gt;&lt;P&gt;4. Cluster display is unexpected...you see a name displayed in the cluster symbol and the cluster count. You only want to see cluster count in this scenario.&lt;/P&gt;&lt;P&gt;If this is accurate, then you need to move the feature labels outside of the CIM Symbol and move them to a LabelClass on the layers labelingInfo. This should render the feature labels for individual features only. Cluster labels (cluster count) will only display for clusters of a size 2 or greater.&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 22:09:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/rendering-feature-attribute-when-cluster-goes-to/m-p/1612238#M87096</guid>
      <dc:creator>KristianEkenes</dc:creator>
      <dc:date>2025-05-06T22:09:07Z</dc:date>
    </item>
  </channel>
</rss>

