Class
MapPin

Represents a map pin graphical object that displays a pin-shaped marker at a specific geographic location with customizable appearance and hit testing.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.RadMap.dll

Syntax:

cs-api-definition
public class MapPin : MapPathBasedVisualElement, IClusterable, IBorderElement, IBoxStyle, IBoxElement, IFillElement, ITextElement, IShapedElement

Inheritance: objectMapVisualElementMapPathBasedVisualElementMapPin

Implements: IBorderElementIBoxElementIBoxStyleIClusterableIFillElementIShapedElementITextElement

Inherited Members MapPathBasedVisualElement.ViewportChanged(IMapViewport, ViewportChangeAction)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.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.ToolTipTextMapVisualElement.RawResourceMapVisualElement.Shape

Constructors

MapPin(PointG)

Initializes a new instance of the MapPin class at the specified geographic location with default appearance settings.

Declaration

cs-api-definition
public MapPin(PointG location)

Parameters

location

PointG

The PointG geographic location where the pin will be positioned on the map.

Properties

IsOutline

Gets a value indicating whether this pin uses outline rendering mode, always returning false for filled pin display.

Declaration

cs-api-definition
protected override bool IsOutline { get; }

Property Value

bool

Overrides MapPathBasedVisualElement.IsOutline

Size

Gets or sets the size of the pin in pixels, automatically invalidating the graphics path cache when changed for proper redrawing.

Declaration

cs-api-definition
public override Size Size { get; set; }

Property Value

Size

Overrides MapVisualElement.Size

Methods

CreateVisualElementInfo(IMapViewport)

Creates the visual element information including the pin-shaped graphics path and pixel offset for rendering at the specified viewport.

Declaration

cs-api-definition
protected override MapVisualElementInfo CreateVisualElementInfo(IMapViewport viewport)

Parameters

viewport

IMapViewport

The IMapViewport used for calculating pixel coordinates and path dimensions.

Returns

MapVisualElementInfo

A MapVisualElementInfo containing the graphics path and offset information for the pin.

Overrides MapPathBasedVisualElement.CreateVisualElementInfo(IMapViewport)

HitTest(PointG, PointL, IMapViewport)

Performs hit testing to determine if the specified point intersects with the pin's center dot area, including wraparound positioning support.

Declaration

cs-api-definition
public override bool HitTest(PointG pointG, PointL pointL, IMapViewport viewport)

Parameters

pointG

PointG

The PointG geographic coordinates to test for intersection.

pointL

PointL

The PointL pixel coordinates to test for intersection.

viewport

IMapViewport

The IMapViewport providing zoom level and wraparound information for accurate hit testing.

Returns

bool

True if the point intersects with the pin's center dot area; otherwise, false.

Overrides MapPathBasedVisualElement.HitTest(PointG, PointL, IMapViewport)

Paint(IGraphics, IMapViewport)

Paints the map pin to the specified graphics context with anti-aliasing, fill, border, and center dot rendering including wraparound support.

Declaration

cs-api-definition
public override void Paint(IGraphics graphics, IMapViewport viewport)

Parameters

graphics

IGraphics

The IGraphics context used for rendering the pin.

viewport

IMapViewport

The IMapViewport providing zoom level, pan offset, and wraparound information.

Overrides MapVisualElement.Paint(IGraphics, IMapViewport)