IClusterItemFactory.CustomizeCluster(MapItem) Method
Allows you to configure a cluster element before it is rendered on the map.
Namespace: DevExpress.XtraMap
Assembly: DevExpress.XtraMap.v24.1.dll
NuGet Package: DevExpress.Win.Map
Declaration
Parameters
Name | Type | Description |
---|---|---|
cluster | MapItem | A map item that denotes a cluster. |
Remarks
The following example uses the CustomizeCluster
method to format cluster element titles. Each cluster’s title displays the number of items that the cluster contains:
clusterer.SetClusterItemFactory(new CustomClusterItemFactory());
// ...
class CustomClusterItemFactory : IClusterItemFactory {
public MapItem CreateClusterItem(IList<MapItem> objects) {
return new MapDot();
}
public void CustomizeCluster(MapItem cluster) {
((MapDot)cluster).TitleOptions.Pattern = cluster.ClusteredItems.Count.ToString();
}
}
See Also