Skip to main content

VectorLayer Class

Definition

Assembly:Avalonia.Controls.Charts
Package:Avalonia.Controls.Charts

A vector layer for rendering lines, arcs, circles and polygons on the map.

public class VectorLayer

Inheritance: object -> AvaloniaObject -> MapLayer -> VectorLayer

Constructors

NameDescription
VectorLayerInitializes a new instance of the Avalonia.Controls.Charts.VectorLayer class.

VectorLayer Constructor

Initializes a new instance of the Avalonia.Controls.Charts.VectorLayer class.

public VectorLayer()

Methods

NameDescription
GetLayerBoundsGets the geographic bounds (in 0-200, 0-100 viewport units) of the content in this layer. Used for auto-scaling the map to fit content.
RenderRenders this layer to the drawing context.
GetPointDataGets the data item at the specified screen point. Inherited from MapLayer.
OnPointerExitedHandles pointer exited events. Override this method to handle interactions (e.g. clearing hover effects). Inherited from MapLayer.
OnPointerMovedHandles pointer moved events. Override this method to handle interactions (e.g. hover effects). Inherited from MapLayer.
OnPointerPressedHandles pointer pressed events. Override this method to handle interactions (e.g. selection). Inherited from MapLayer.
Bind (8 overloads)Binds a Avalonia.AvaloniaProperty to an Avalonia.Data.BindingBase. Inherited from AvaloniaObject.
CheckAccessReturns a value indicating whether the current thread is the UI thread. Inherited from AvaloniaObject.
ClearValue (4 overloads)Clears a Avalonia.AvaloniaProperty's local value. Inherited from AvaloniaObject.
CoerceValueCoerces the specified Avalonia.AvaloniaProperty. Inherited from AvaloniaObject.
EqualsCompares two objects using reference equality. Inherited from AvaloniaObject.
GetBaseValueInherited from AvaloniaObject.
GetHashCodeGets the hash code for the object. Inherited from AvaloniaObject.
GetValue (3 overloads)Gets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject.
IsAnimatingChecks whether a Avalonia.AvaloniaProperty is animating. Inherited from AvaloniaObject.
IsSetChecks whether a Avalonia.AvaloniaProperty is set on this object. Inherited from AvaloniaObject.
SetCurrentValue (2 overloads)Sets the value of a dependency property without changing its value source. Inherited from AvaloniaObject.
SetValue (3 overloads)Sets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject.
VerifyAccessChecks that the current thread is the UI thread and throws if not. Inherited from AvaloniaObject.

GetLayerBounds Method

Gets the geographic bounds (in 0-200, 0-100 viewport units) of the content in this layer. Used for auto-scaling the map to fit content.

public Nullable<Avalonia.Rect> GetLayerBounds()

Returns

Nullable<Avalonia.Rect>

Render Method

Renders this layer to the drawing context.

public void Render(Avalonia.Media.DrawingContext context, Avalonia.Rect chartArea, double animationProgress)

Parameters

context Avalonia.Media.DrawingContext

The drawing context.

chartArea Avalonia.Rect

The chart area rectangle.

animationProgress double

Animation progress from 0 to 1.

Properties

NameDescription
ArcsGets or sets the collection of arcs.
CirclesGets or sets the collection of circles.
IsLineAnimationEnabledGets or sets whether to animate line drawing.
LinesGets or sets the collection of lines.
PolygonsGets or sets the collection of polygons.
PolylinesGets or sets the collection of polylines.
IsVisibleGets or sets whether this layer is visible. Inherited from MapLayer.
OpacityGets or sets the opacity of this layer. Inherited from MapLayer.
TooltipTemplateGets or sets the data template used for tooltips. Inherited from MapLayer.
DispatcherReturns the Avalonia.AvaloniaObject.Dispatcher that this Avalonia.AvaloniaObject is associated with. Inherited from AvaloniaObject.
ItemInherited from AvaloniaObject.

Arcs Property

Gets or sets the collection of arcs.

public System.Collections.Generic.IList<Avalonia.Controls.Charts.MapArc> Arcs { get; set; }

Circles Property

Gets or sets the collection of circles.

public System.Collections.Generic.IList<Avalonia.Controls.Charts.MapCircle> Circles { get; set; }

IsLineAnimationEnabled Property

Gets or sets whether to animate line drawing.

public bool IsLineAnimationEnabled { get; set; }

Lines Property

Gets or sets the collection of lines.

public System.Collections.Generic.IList<Avalonia.Controls.Charts.MapLine> Lines { get; set; }

Polygons Property

Gets or sets the collection of polygons.

public System.Collections.Generic.IList<Avalonia.Controls.Charts.MapPolygon> Polygons { get; set; }

Polylines Property

Gets or sets the collection of polylines.

public System.Collections.Generic.IList<Avalonia.Controls.Charts.MapPolyline> Polylines { get; set; }

Fields

ArcsProperty Field

Identifies the Avalonia.Controls.Charts.VectorLayer.Arcs Avalonia property.

public Avalonia.StyledProperty<System.Collections.Generic.IList<Avalonia.Controls.Charts.MapArc>> ArcsProperty

CirclesProperty Field

Identifies the Avalonia.Controls.Charts.VectorLayer.Circles Avalonia property.

public Avalonia.StyledProperty<System.Collections.Generic.IList<Avalonia.Controls.Charts.MapCircle>> CirclesProperty

IsLineAnimationEnabledProperty Field

Identifies the Avalonia.Controls.Charts.VectorLayer.IsLineAnimationEnabled Avalonia property.

public Avalonia.StyledProperty<bool> IsLineAnimationEnabledProperty

LinesProperty Field

Identifies the Avalonia.Controls.Charts.VectorLayer.Lines Avalonia property.

public Avalonia.StyledProperty<System.Collections.Generic.IList<Avalonia.Controls.Charts.MapLine>> LinesProperty

PolygonsProperty Field

Identifies the Avalonia.Controls.Charts.VectorLayer.Polygons Avalonia property.

public Avalonia.StyledProperty<System.Collections.Generic.IList<Avalonia.Controls.Charts.MapPolygon>> PolygonsProperty

PolylinesProperty Field

Identifies the Avalonia.Controls.Charts.VectorLayer.Polylines Avalonia property.

public Avalonia.StyledProperty<System.Collections.Generic.IList<Avalonia.Controls.Charts.MapPolyline>> PolylinesProperty

Events

NameDescription
InvalidatedEvent raised when the layer needs to be redrawn. Inherited from MapLayer.
PropertyChangedRaised when a Avalonia.AvaloniaProperty value changes on this object. Inherited from AvaloniaObject.