Class
ClusterItemGenerator

Default cluster items 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 ClusterItemGenerator : IClusterItemGenerator

Inheritance: objectClusterItemGenerator

Implements: IClusterItemGenerator

Constructors

ClusterItemGenerator()

Initializes a new instance of the ClusterItemGenerator class.

Declaration

cs-api-definition
public ClusterItemGenerator()

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.

DataMappings

Gets the value mappings that constitute the data mappings for a layer.

Declaration

cs-api-definition
public DataMappingCollection DataMappings { get; }

Property Value

DataMappingCollection

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

Methods

CreateCluster(Location, object)

Creates cluster at the specified location.

Declaration

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

Parameters

center

Location

Center of the cluster.

item

object

Data item which initialized creation of the cluster.

Returns

ClusterItem

New cluster item.

Implements IClusterItemGenerator.CreateCluster(Location, object)

GetBindingForLocation(object)

Gets binding for location property.

Declaration

cs-api-definition
public virtual Binding GetBindingForLocation(object dataItem)

Parameters

dataItem

object

Data item to which is binding source.

Returns

Binding

Binding to location property.

Implements IClusterItemGenerator.GetBindingForLocation(object)

GetLocationFromItem(object)

Gets location from the data item.

Declaration

cs-api-definition
public virtual Location GetLocationFromItem(object dataItem)

Parameters

dataItem

object

Data item to get location from.

Returns

Location

Location of the data item.

Implements IClusterItemGenerator.GetLocationFromItem(object)

IsItemInClusterRegion(ClusterItem, object, int)

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

Declaration

cs-api-definition
public virtual bool IsItemInClusterRegion(ClusterItem cluster, object dataItem, int zoomLevel)

Parameters

cluster

ClusterItem

Cluster.

dataItem

object

Data item.

zoomLevel

int

Zoom level.

Returns

bool

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

Implements IClusterItemGenerator.IsItemInClusterRegion(ClusterItem, object, int)