windowsforms-devexpress-dot-xtramap-dot-mapclustererbase-dot-setclusteritemfactory-x28-devexpress-dot-xtramap-dot-iclusteritemfactory-x29.md
Sets the factory used to create cluster representatives from items in a cluster.
Namespace : DevExpress.XtraMap
Assembly : DevExpress.XtraMap.v25.2.dll
NuGet Package : DevExpress.Win.Map
public void SetClusterItemFactory(
IClusterItemFactory clusterItemFactory
)
Public Sub SetClusterItemFactory(
clusterItemFactory As IClusterItemFactory
)
| Name | Type | Description |
|---|---|---|
| clusterItemFactory | IClusterItemFactory |
An object of the class implementing the IClusterItemFactory interface.
|
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SetClusterItemFactory(IClusterItemFactory) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-map-aggregate-vector-items-using-a-clusterer/CS/ClustererSample/Form1.cs#L28
clusterer.SetClusterItemFactory(new CustomClusterItemFactory());
DataAdapter.Clusterer = clusterer;
winforms-map-aggregate-vector-items-using-a-clusterer/VB/ClustererSample/Form1.vb#L33
Dim clusterer As DistanceBasedClusterer = New DistanceBasedClusterer With {.ItemMaxSize = 60, .ItemMinSize = 14, .GroupProvider = New AttributeGroupProvider With {.AttributeName = "LocationName"}}
clusterer.SetClusterItemFactory(New CustomClusterItemFactory())
DataAdapter.Clusterer = clusterer
See Also