Back to Devexpress

MapClustererBase.SetClusterItemFactory(IClusterItemFactory) Method

windowsforms-devexpress-dot-xtramap-dot-mapclustererbase-dot-setclusteritemfactory-x28-devexpress-dot-xtramap-dot-iclusteritemfactory-x29.md

latest2.9 KB
Original Source

MapClustererBase.SetClusterItemFactory(IClusterItemFactory) Method

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

Declaration

csharp
public void SetClusterItemFactory(
    IClusterItemFactory clusterItemFactory
)
vb
Public Sub SetClusterItemFactory(
    clusterItemFactory As IClusterItemFactory
)

Parameters

NameTypeDescription
clusterItemFactoryIClusterItemFactory

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

csharp
clusterer.SetClusterItemFactory(new CustomClusterItemFactory());
DataAdapter.Clusterer = clusterer;

winforms-map-aggregate-vector-items-using-a-clusterer/VB/ClustererSample/Form1.vb#L33

vb
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

MapClustererBase Class

MapClustererBase Members

DevExpress.XtraMap Namespace