Class ClusterItemGenerator
Default cluster items generator. Group data items using distance between 2 locations in degrees.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Controls.Map
Assembly: Telerik.Windows.Controls.DataVisualization.dll
Syntax
public class ClusterItemGenerator : IClusterItemGenerator
Constructors
ClusterItemGenerator()
Initializes a new instance of the ClusterItemGenerator class.
Declaration
public ClusterItemGenerator()
Properties
AutoExpandWhenSingle
Gets or sets value which indicates whether cluster should be automatically expanded when it contains 1 data item only.
Declaration
public bool AutoExpandWhenSingle { get; set; }
Property Value
System.Boolean
|
CloseDistance
Gets or sets array of the doubles which define close distance between 2 locations in degrees for every zoom level.
Declaration
public double[] CloseDistance { get; set; }
Property Value
System.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
public DataMappingCollection DataMappings { get; }
Property Value
DataMappingCollection
|
DeleteWhenEmpty
Gets or sets value which indicates whether cluster should be deleted if it is empty.
Declaration
public bool DeleteWhenEmpty { get; set; }
Property Value
System.Boolean
|
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
public double ExpandRadius { get; set; }
Property Value
System.Double
|
HideExpanded
Indicates whether expanded cluster should be hidden.
Declaration
public bool HideExpanded { get; set; }
Property Value
System.Boolean
|
Methods
CreateCluster(Location, Object)
Creates cluster at the specified location.
Declaration
public virtual ClusterItem CreateCluster(Location center, object item)
Parameters
Location
center
Center of the cluster. |
System.Object
item
Data item which initialized creation of the cluster. |
Returns
ClusterItem
New cluster item. |
Implements
GetBindingForLocation(Object)
Gets binding for location property.
Declaration
public virtual Binding GetBindingForLocation(object dataItem)
Parameters
System.Object
dataItem
Data item to which is binding source. |
Returns
System.Windows.Data.Binding
Binding to location property. |
Implements
GetLocationFromItem(Object)
Gets location from the data item.
Declaration
public virtual Location GetLocationFromItem(object dataItem)
Parameters
System.Object
dataItem
Data item to get location from. |
Returns
Location
Location of the data item. |
Implements
IsItemInClusterRegion(ClusterItem, Object, Int32)
Detects whether given original data item belongs to the region of the specified cluster.
Declaration
public virtual bool IsItemInClusterRegion(ClusterItem cluster, object dataItem, int zoomLevel)
Parameters
ClusterItem
cluster
Cluster. |
System.Object
dataItem
Data item. |
System.Int32
zoomLevel
Zoom level. |
Returns
System.Boolean
true - if data item belongs to the region of the specified cluster. |