0

Problem: Unsure how to set a custom icon for the cluster symbol, not the individual points or even the label of the cluster but the symbology for the cluster icon itself.

Context: A Feature Layer is being rendered by unique value with picture marker symbols for each value. When clustering is applied it picks one of the PictureMarkerSymbols to use as the symbology for the cluster point itself. I would like to have a completely different symbol for the cluster itself.

Is there a way to customise the cluster icon?

TLDR: Esri Leaflet seems to accomplish exactly what I am describing (see link and gif): https://esri.github.io/esri-leaflet/examples/styling-clusters.html Is the cluster symbol being different from the feature symbol possible to do in the ESRI JS API? enter image description here

1 Answer 1

0

The cluster symbol depends on the feature layer symbol, take a look at the examples an explanation of the API documentation, styles and configuration section.

ArcGIS API - FeatureReductionCluster

While this can be thought of as a visualization technique, clustering is actually a method of reducing features in the view. It is therefore independent of the Renderer. The style, labels, and popup of each cluster summarizes the features it represents.

Personally, I think it makes sense. This because it is actually showing a group of features, so naturally the cluster symbology should somehow depend on the features that are grouped.

2
  • Given that featureReduction seems to do a calculation and select the most common feature, there might have been a way to intercept that / modify that and point to a different graphic to display? If not, is there a way where what I described could be performed without using featureReduction? E.g. using multiple layers or something? Commented Oct 31, 2020 at 23:51
  • Yeah I think that could be one way to achieve it .. Another could be the disable feature reduction at a certain zoom level and have two symbols one for the upper levels an one for the lower levels .. What exactly you have in mind? what you want to achieve?
    – cabesuon
    Commented Nov 2, 2020 at 11:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.