New to Telerik UI for WPFStart a free 30-day trial

Default cluster generator. Group data items using distance between 2 locations in degrees.

Definition

Namespace:Telerik.Windows.Controls.Map

Assembly:Telerik.Windows.Controls.DataVisualization.dll

Syntax:

C#
public class DefaultClusterGenerator : IClusterGenerator

Inheritance: objectDefaultClusterGenerator

Implements: IClusterGenerator

Constructors

Initializes a new instance of the DefaultClusterGenerator class.

C#
public DefaultClusterGenerator()

Properties

Gets or sets value which indicates whether cluster should be automatically expanded when it contains 1 data item only.

C#
public bool AutoExpandWhenSingle { get; set; }

Gets or sets array of the doubles which define close distance between 2 locations in degrees for every zoom level.

C#
public double[] CloseDistance { get; set; }
Remarks:

If distance between 2 locations for the given zoom level is less than value in the array, then we consider these 2 locations as close ones. Close locations should be combined into 1 cluster.

Gets or sets value which indicates whether cluster should be deleted if it is empty.

C#
public bool DeleteWhenEmpty { get; set; }

Gets or sets radius (in pixels) which will be used to calculate coordinates of the items when cluster is expanded to the polygon vertices.

C#
public double ExpandRadius { get; set; }

Indicates whether expanded cluster should be hidden.

C#
public bool HideExpanded { get; set; }

Information layer this map canvas belongs to.

C#
public VisualizationLayer Layer { get; set; }

Implements: IClusterGenerator.Layer

Methods

Creates cluster at the specified location.

C#
public virtual ClusterData CreateCluster(Location center, object item)
Parameters:centerLocation

Center of the cluster.

itemobject

Data item which initialized creation of the cluster.

Returns:

ClusterData

New cluster item.

Implements: IClusterGenerator.CreateCluster(Location, object)

Detects whether given original data item belongs to the region of the specified cluster.

C#
public virtual bool IsItemInClusterRegion(ClusterData cluster, MapObjectInfo info, int zoomLevel)
Parameters:clusterClusterData

Cluster.

infoMapObjectInfo

Map object information.

zoomLevelint

Zoom level.

Returns:

bool

true - if data item belongs to the region of the specified cluster.

Implements: IClusterGenerator.IsItemInClusterRegion(ClusterData, MapObjectInfo, int)

Detects whether cluster should be regenerated for the given zoom level.

C#
public virtual bool RegenerationNeeded(ClusterData cluster, int zoomLevel)
Parameters:clusterClusterData

Cluster.

zoomLevelint

Zoom level.

Returns:

bool

true - if cluster should be regenerated at the given zoom level, otherwise false.

Implements: IClusterGenerator.RegenerationNeeded(ClusterData, int)