Clustering declutters the screen by hiding features that would otherwise intersect with other features on screen.
Referenced by: Feature Reduction
Properties
Property | Details |
---|---|
clusterMaxSize | Size of the largest cluster, in screen units (points). |
clusterMinSize | Size of the smallest cluster, in screen units (points). |
clusterRadius | Strength of clustering, in screen units (points). |
disablePopup | Indicates whether to disable viewing popups defined for the clusters. |
drawingInfo | Contains labeling and rendering information for the cluster. |
fields[] | An array of objects defining the aggregate fields to use in cluster popups, labels, and explicit renderers. |
popupInfo | Defines the popup used to describe aggregate data in the selected cluster. |
showLabels | Defines whether labels should be shown in the clusters. |
type | Type of feature reduction. Valid value of this property cluster |
visibilityInfo | Defines the threshold for toggling between when a layer should be drawn using the feature reduction configuration versus the layer's drawing info. |
Clustered layer defined with a popup and labels Example
{
"type": "cluster",
"clusterRadius": 75,
"clusterMinSize": 18,
"clusterMaxSize": 45,
"popupInfo": {
"description": "This cluster represents {cluster_count} features.",
"fieldInfos": [
{
"fieldName": "cluster_count",
"format": {
"digitSeparator": true,
"places": 0
},
"visible": false
}
],
"title": ""
},
"drawingInfo": {
"labelingInfo": [
{
"deconflictionStrategy": "none",
"labelExpressionInfo": {
"expression": "Text($feature.cluster_count, '#,###')"
},
"labelPlacement": "esriServerPointLabelPlacementCenterCenter",
"symbol": {
"type": "esriTS",
"color": [
0,
74,
93,
255
],
"font": {
"family": "Noto Sans",
"size": 9,
"weight": "bold"
},
"horizontalAlignment": "center",
"kerning": true,
"rotated": false,
"text": "",
"xoffset": 0,
"yoffset": 0,
"angle": 0
}
}
]
},
"showLabels": true,
"disablePopup": false,
"visibilityInfo": {
"maxScale": 24000,
"type": "scale"
}
}