This document introduces the Map Clusterers, lists clusterer types, and explains how to create a clusterer and customize its settings.
The document consists of the following sections.
The Clusterer is used to aggregate map items based on their location.
This can, for example, be useful to perform density analysis.
To apply the clustering, assign one of the clusterers described below to the MapDataAdapterBase.Clusterer property.
The Marker Clusterer aggregates items using the following approach.
The Marker Clusterer is represented by the MarkerClusterer class.
The Distance-based Clusterer aggregates items using the following approach.
The Distance-based Clusterer is represented by the DistanceBasedClusterer class.
The following table represents the result comparison of clustering using the described above methods.
To implement a custom clusterer, design a class inheriting the MapClustererBase class.
All clusterers shipped with the Map Control support items group providers and custom item factories.
Group Providers allow you to separate vector items depending on certain values. By default, the clusterers can use the predefined AttributeGroupProvider to group items by attribute values.
To implement a custom Group Provider, design a class inheriting the MapClustererGroupProviderBase interface.
The following image demonstrates vector items grouped by location name.
To customize a cluster representative, you can use the Item Settings. To do this, assign the required MapItemSettings class descendant object to the MapClusterer.ClusterSettings property.
The following image demonstrates, the custom cluster representatives created using a specified MapCustomElementSettings object.
The following examples demonstrate clusterers in action.