Select to view content in your preferred language

FeatureReduction Clustering and unique Value renderer

162
1
Jump to solution
05-22-2024 01:17 PM
EugeneStaten
New Contributor III

Hi...

Our company has been clustering points since 2015 for our client and have had to hack away, through trial and error to get the clustering we require when a new version of the javascript api is implemented.

We would love to make use of FeatureReduction clustering and are using it in many circumstances, but our primary, incident management layer still requires something I have yet to see in ESRI's clustering.

Perhaps it is there, but there are no examples of how to make it happen, so I'm posting in hopes of discovering how to make this work.

EugeneStaten_0-1716408131677.png

 

This is an exampe of what we do.  We post up to 14 unique incident types and each type has it's own PictureMarkerSymbol.  When two or more incidents are near enough, we cluster them, regardless of what type they are and can display a popup, that contains the PictureMarker symbol and attribute information of each, individual incident in the cluster.  When there is a single item we show the PictureMarker for its type and when there are two or more, we show a custom CIMSymbol with the number of incidents in the cluster.

We do this in a GraphicsLayer, with a ton of customization of the GraphicsLayerView, but we want to have a Feature layer with a uniquevalue renderer and FeatureReduction clustering.

We want to show the unique value when there is only one item within the cluster's pixel range but the Cluster Symbol when there are two or more.  

Can this be done in version 4.29?

If so, is there and example of this?

If this is not there yet, may we obtain some documentation on how to extend the FeatureReduction Clusterer to, perhaps, get what we need?

Thanks for any and all replies.

 

0 Kudos
1 Solution

Accepted Solutions
AnneFitz
Esri Regular Contributor

Hi @EugeneStaten - yes this is possible starting at version 4.25! You can set a specific cluster symbol for your clusters, and your individual features will render with their original renderer. Here's an example, where the  triangles represent individual features: https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-cluster-symbol/

Screenshot 2024-05-23 at 12.52.16 PM.png

View solution in original post

1 Reply
AnneFitz
Esri Regular Contributor

Hi @EugeneStaten - yes this is possible starting at version 4.25! You can set a specific cluster symbol for your clusters, and your individual features will render with their original renderer. Here's an example, where the  triangles represent individual features: https://developers.arcgis.com/javascript/latest/sample-code/featurereduction-cluster-symbol/

Screenshot 2024-05-23 at 12.52.16 PM.png