ClusteringFeatureReduction

constructor(renderer: Renderer)

Creates a ClusteringFeatureReduction object using the given renderer and default values for min size, max size and radius of the cluster. Only SimpleRenderer, UniqueValueRenderer, and ClassBreaksRenderer are currently supported for AggregationFeatureReduction.renderer. UniqueValueRenderer with multiple fields is not supported. If the renderer passed is not one of the supported renderer types listed above, then original features from the FeatureLayer or original graphics from the GraphicsOverlay are drawn using FeatureLayer.renderer or GraphicsOverlay.renderer respectively. In case of FeatureLayer, a LayerViewState that contains an error indicating the use of an unsupported renderer is bubbled up. Also note, AggregationFeatureReduction.renderer is independent of FeatureLayer.renderer and GraphicsOverlay.renderer.

If you want to symbolize clusters using the same symbology used by the FeatureLayer or GraphicsOverlay, you may clone FeatureLayer.renderer or GraphicsOverlay.renderer and set it here. You can also create a new renderer of a supported type. If you create a new SimpleRenderer, clusters will be drawn using the symbol defined for the SimpleRenderer. If the new renderer is of type ClassBreaksRenderer or UniqueValueRenderer, the field name on the renderer must match one of the AggregateField in AggregationFeatureReduction.aggregateFields. If this field is not found in AggregationFeatureReduction.aggregateFields, the cluster will be drawn using ClassBreaksRenderer.defaultSymbol or UniqueValueRenderer.defaultSymbol. If there is no default symbol defined, clusters will not be drawn.

Since

200.3.0