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

Represents a filled geographic polygon with an outer boundary and optional inner boundaries.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.RadMap.dll

Syntax:

C#
public class MapPolygon : MapGeometry, IClusterable, IBorderElement, IBoxStyle, IBoxElement, IFillElement, ITextElement, IShapedElement, IExtendedData, IColorizable

Inheritance: objectMapVisualElementMapPathBasedVisualElementMapGeometryMapPolygon

Implements: IBorderElementIBoxElementIBoxStyleIClusterableIColorizableIExtendedDataIFillElementIShapedElementITextElement...

Inherited Members MapGeometry.OnExtendedDataPropertyChanged(object, PropertyChangedEventArgs)MapGeometry.ResolveEntityReferences()MapGeometry.TextMapGeometry.DrawTextMapGeometry.ColorizerColorMapGeometry.ExtendedDataMapGeometry.BackColorMapGeometry.BackColor2MapGeometry.BackColor3MapGeometry.BackColor4MapPathBasedVisualElement.ViewportChanged(IMapViewport, ViewportChangeAction)MapPathBasedVisualElement.HitTest(PointG, PointL, IMapViewport)MapPathBasedVisualElement.GetVisualElementInfo(IMapViewport)MapPathBasedVisualElement.ResetGraphicsPathCache()MapPathBasedVisualElement.IsInViewportMapPathBasedVisualElement.LocationMapVisualElement.GetGeographicBounds()MapVisualElement.GetCurrentShape()MapVisualElement.GeographicBoundsMapVisualElement.LayerMapVisualElement.IsVisibleMapVisualElement.IsSelectedMapVisualElement.TagMapVisualElement.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.ToolTipTextMapVisualElement.RawResourceMapVisualElement.Shape...

Constructors

Initializes a new instance of the MapPolygon class.

C#
public MapPolygon(IEnumerable<PointG> outerBoundary, List<List<PointG>> innerBoundaries)
Parameters:outerBoundaryIEnumerable<PointG>

The outer boundary of this polygon.

innerBoundariesList<List<PointG>>

The inner boundaries of this polygon.

Initializes a new instance of the MapPolygon class.

C#
public MapPolygon(IEnumerable<PointG> outerBoundary)
Parameters:outerBoundaryIEnumerable<PointG>

The outer boundary of this polygon.

Properties

Gets the inner boundaries.

C#
public List<List<PointG>> InnerBoundaries { get; }
Property Value:

The points.

Gets whether hit testing is limited to the polygon outline; a filled polygon is tested across its area.

C#
protected override bool IsOutline { get; }

Overrides: MapPathBasedVisualElement.IsOutline

OuterBoundary

IEnumerable<PointG>

Gets the outer boundary.

C#
public IEnumerable<PointG> OuterBoundary { get; }
Property Value:

The points.

Methods

Projects the outer and inner boundaries into a graphics path; alternate fill mode makes inner boundaries holes.

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

The viewport whose zoom level is used to project the boundary points.

Returns:

MapVisualElementInfo

The projected polygon path and its map-pixel offset.

Overrides: MapPathBasedVisualElement.CreateVisualElementInfo(IMapViewport)

Fills and outlines the polygon and draws its resolved text for each wraparound copy.

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

The graphics context used to draw the polygon.

viewportIMapViewport

The viewport that supplies map projection, pan, zoom, and wraparound state.

Overrides: MapVisualElement.Paint(IGraphics, IMapViewport)