Class
DefaultClusterGenerator

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:

cs-api-definition
public class DefaultClusterGenerator : IClusterGenerator

Inheritance: objectDefaultClusterGenerator

Implements: IClusterGenerator

Constructors

DefaultClusterGenerator()

Initializes a new instance of the DefaultClusterGenerator class.

Declaration

cs-api-definition
public DefaultClusterGenerator()

Properties

AutoExpandWhenSingle

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

Declaration

cs-api-definition
public bool AutoExpandWhenSingle { get; set; }

Property Value

bool

CloseDistance

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

Declaration

cs-api-definition
public double[] CloseDistance { get; set; }

Property Value

double[]

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.

DeleteWhenEmpty

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

Declaration

cs-api-definition
public bool DeleteWhenEmpty { get; set; }

Property Value

bool

ExpandRadius

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

Declaration

cs-api-definition
public double ExpandRadius { get; set; }

Property Value

double

HideExpanded

Indicates whether expanded cluster should be hidden.

Declaration

cs-api-definition
public bool HideExpanded { get; set; }

Property Value

bool

Layer

Information layer this map canvas belongs to.

Declaration

cs-api-definition
public VisualizationLayer Layer { get; set; }

Property Value

VisualizationLayer

Implements IClusterGenerator.Layer

Methods

CreateCluster(Location, object)

Creates cluster at the specified location.

Declaration

cs-api-definition
public virtual ClusterData CreateCluster(Location center, object item)

Parameters

center

Location

Center of the cluster.

item

object

Data item which initialized creation of the cluster.

Returns

ClusterData

New cluster item.

Implements IClusterGenerator.CreateCluster(Location, object)

IsItemInClusterRegion(ClusterData, MapObjectInfo, int)

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

Declaration

cs-api-definition
public virtual bool IsItemInClusterRegion(ClusterData cluster, MapObjectInfo info, int zoomLevel)

Parameters

cluster

ClusterData

Cluster.

info

MapObjectInfo

Map object information.

zoomLevel

int

Zoom level.

Returns

bool

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

Implements IClusterGenerator.IsItemInClusterRegion(ClusterData, MapObjectInfo, int)

RegenerationNeeded(ClusterData, int)

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

Declaration

cs-api-definition
public virtual bool RegenerationNeeded(ClusterData cluster, int zoomLevel)

Parameters

cluster

ClusterData

Cluster.

zoomLevel

int

Zoom level.

Returns

bool

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

Implements IClusterGenerator.RegenerationNeeded(ClusterData, int)