New to Telerik UI for WinForms? Start a free 30-day trial

Represents grouped map items with a count-labeled marker positioned at the cluster location.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.RadMap.dll

Syntax:

C#
public class MapCluster : MapPathBasedVisualElement, IClusterable, IBorderElement, IBoxStyle, IBoxElement, IFillElement, ITextElement, IShapedElement

Inheritance: objectMapVisualElementMapPathBasedVisualElementMapCluster

Implements: IBorderElementIBoxElementIBoxStyleIClusterableIFillElementIShapedElementITextElement...

Inherited Members MapPathBasedVisualElement.GetVisualElementInfo(IMapViewport)MapPathBasedVisualElement.ResetGraphicsPathCache()MapPathBasedVisualElement.IsInViewportMapPathBasedVisualElement.LocationMapVisualElement.GetGeographicBounds()MapVisualElement.GetCurrentShape()MapVisualElement.GeographicBoundsMapVisualElement.LayerMapVisualElement.IsVisibleMapVisualElement.IsSelectedMapVisualElement.TagMapVisualElement.BackColorMapVisualElement.BackColor2MapVisualElement.BackColor3MapVisualElement.BackColor4MapVisualElement.NumberOfColorsMapVisualElement.GradientAngleMapVisualElement.GradientPercentageMapVisualElement.GradientPercentage2MapVisualElement.GradientStyleMapVisualElement.SizeMapVisualElement.SmoothingModeMapVisualElement.BorderColorMapVisualElement.BorderColor2MapVisualElement.BorderColor3MapVisualElement.BorderColor4MapVisualElement.InnerColorMapVisualElement.InnerColor2MapVisualElement.InnerColor3MapVisualElement.InnerColor4MapVisualElement.BoxStyleMapVisualElement.BorderDrawModeMapVisualElement.BorderDashStyleMapVisualElement.BorderDashPatternMapVisualElement.LeftColorMapVisualElement.LeftShadowColorMapVisualElement.TopColorMapVisualElement.TopShadowColorMapVisualElement.RightColorMapVisualElement.RightShadowColorMapVisualElement.BottomColorMapVisualElement.BottomShadowColorMapVisualElement.BorderWidthMapVisualElement.LeftWidthMapVisualElement.TopWidthMapVisualElement.RightWidthMapVisualElement.BottomWidthMapVisualElement.OffsetMapVisualElement.BorderSizeMapVisualElement.HorizontalWidthMapVisualElement.VerticalWidthMapVisualElement.ForeColorMapVisualElement.FontMapVisualElement.TextMapVisualElement.RawResourceMapVisualElement.Shape...

Constructors

Initializes a new instance of the MapCluster class.

C#
public MapCluster()

Properties

Gets the clustered items.

C#
public List<IClusterable> ClusteredItems { get; }
Property Value:

The clustered items.

Gets whether the cluster marker is outline-only; clusters use a filled marker.

C#
protected override bool IsOutline { get; }

Overrides: MapPathBasedVisualElement.IsOutline

Gets or sets the pixel padding around the centered item count when sizing the cluster marker; the default is five pixels on each side.

C#
public Padding Padding { get; set; }

Gets the assigned tooltip, or the single clustered item's tooltip when no cluster tooltip is set.

C#
public override string ToolTipText { get; set; }

Overrides: MapVisualElement.ToolTipText

Methods

Creates a centered ellipse sized to fit the cluster count and configured padding.

C#
protected override MapVisualElementInfo CreateVisualElementInfo(IMapViewport viewport)
Parameters:viewportIMapViewport

The viewport used to project the cluster location.

Returns:

MapVisualElementInfo

The path and projected offset used to render the marker.

Overrides: MapPathBasedVisualElement.CreateVisualElementInfo(IMapViewport)

Gets the items bounding rectangle.

C#
public virtual RectangleG GetItemsBoundingRectangle()
Returns:

RectangleG

RectangleG.

Delegates hit testing to the sole clustered map visual element, or tests the marker for a multi-item cluster.

C#
public override bool HitTest(PointG pointG, PointL pointL, IMapViewport viewport)
Parameters:pointGPointG

The geographic point being tested.

pointLPointL

The map-pixel point being tested.

viewportIMapViewport

The viewport used for projection and wraparound.

Returns:

bool

true if the tested element contains the point; otherwise, false.

Overrides: MapPathBasedVisualElement.HitTest(PointG, PointL, IMapViewport)

Draws the cluster marker, its item count, and each visible horizontal wraparound copy.

C#
public override void Paint(IGraphics graphics, IMapViewport viewport)
Parameters:graphicsIGraphics

The graphics context used for drawing.

viewportIMapViewport

The viewport that supplies pan, zoom, and wraparound information.

Overrides: MapVisualElement.Paint(IGraphics, IMapViewport)

Forwards viewport updates to the sole clustered map visual element, when present, and then updates the cluster marker.

C#
public override void ViewportChanged(IMapViewport viewport, ViewportChangeAction action)
Parameters:viewportIMapViewport

The updated viewport.

actionViewportChangeAction

The viewport changes to process.

Overrides: MapPathBasedVisualElement.ViewportChanged(IMapViewport, ViewportChangeAction)