Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.2.dll

NuGet Package: DevExpress.Win.Map

#Declaration

void CustomizeCluster(
    MapItem cluster
)

#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:

View Example: Map Control for WinForms - How to Use Clusterers to Aggregate Vector Items

        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