ClusteringFeatureReduction class final
Method for aggregating and summarizing features in a point FeatureLayer or point graphics in a GraphicsOverlay in dynamic rendering mode (FeatureRenderingMode.dynamic, or GraphicsRenderingMode.dynamic).
Clustering is configured via the FeatureLayer.featureReduction property of the FeatureLayer or the GraphicsOverlay.featureReduction of the GraphicsOverlay.
Feature clustering allows you to visually represent large numbers of point geoelements in relatively small areas by aggregating them into clusters. Each cluster of two or more points is represented with an AggregateGeoElement that has its own symbol. If a point feature is not clustered, it continues to draw as an individual feature using the layer's renderer. As a user navigates the map, clusters update dynamically depending on the map's scale and extent. Feature clustering only applies to layers with point geometries in a 2D map. It does not apply to layers with polyline and polygon geometries and is not supported in 3D. In such unsupported scenarios, the original features or graphics are drawn. In case of FeatureLayer, a LayerViewState is bubbled up indicating the appropriate error. The symbol for the cluster is determined by the renderer passed to ClusteringFeatureReduction and cluster symbol size is determined by the ClusteringFeatureReduction.minSymbolSize and ClusteringFeatureReduction.maxSymbolSize properties. At present, this API does not support configuring cluster symbol size from another AggregateField.
- Inheritance
-
- Object
- FeatureReduction
- AggregationFeatureReduction
- ClusteringFeatureReduction
Constructors
- ClusteringFeatureReduction(Renderer renderer)
-
Creates a ClusteringFeatureReduction object using the given renderer and
default values for min size, max size and radius of the cluster.
factory
Properties
-
aggregateFields
→ List<
AggregateField> -
An array of AggregateField that summarizes one or more attributes for a
group of geoelements visualized with FeatureReduction.
no setterinherited
- enabled ↔ bool
-
True to enable feature reduction, false to show individual geoelements.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isPopupEnabled ↔ bool
-
A flag indicating whether the PopupDefinition defined on the
PopupSource is enable / disable.
getter/setter pairinherited
-
labelDefinitions
→ List<
LabelDefinition> -
The collection of LabelDefinition objects that define label display for
the summarized attribute values of aggregated geoelements.
no setterinherited
- maxScale ↔ double
-
The map scale at which aggregation is enabled. Geoelements are not
aggregated when the map scale goes beyond the maximum scale.
getter/setter pairinherited
- maxSymbolSize ↔ double
-
The symbol size of the largest cluster in device-independent pixels. The
default value is 70.
getter/setter pair
- minSymbolSize ↔ double
-
The symbol size of the smallest cluster in device-independent pixels. The
default value is 12.
getter/setter pair
- popupDefinition ↔ PopupDefinition?
-
The pop-up definition.
getter/setter pairinherited
- radius ↔ double
-
The radius in device-independent pixels of the area in which multiple
points will be grouped and visualized as a single cluster. The default
value is 60.
getter/setter pair
- renderer ↔ Renderer
-
Defines the symbology for displaying aggregated geoelements.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showLabels ↔ bool
-
True to display labels for aggregated geoelements, false to turn them off.
getter/setter pairinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited