VectorLayer Class
Definition
A vector layer for rendering lines, arcs, circles and polygons on the map.
public class VectorLayer
Constructors
| Name | Description |
|---|---|
| VectorLayer | Initializes 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
| Name | Description |
|---|---|
| GetLayerBounds | 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. |
| Render | Renders this layer to the drawing context. |
| GetPointData | Gets the data item at the specified screen point. Inherited from MapLayer. |
| OnPointerExited | Handles pointer exited events. Override this method to handle interactions (e.g. clearing hover effects). Inherited from MapLayer. |
| OnPointerMoved | Handles pointer moved events. Override this method to handle interactions (e.g. hover effects). Inherited from MapLayer. |
| OnPointerPressed | Handles 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. |
| CheckAccess | Returns 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. |
| CoerceValue | Coerces the specified Avalonia.AvaloniaProperty. Inherited from AvaloniaObject. |
| Equals | Compares two objects using reference equality. Inherited from AvaloniaObject. |
| GetBaseValue | Inherited from AvaloniaObject. |
| GetHashCode | Gets the hash code for the object. Inherited from AvaloniaObject. |
| GetValue (3 overloads) | Gets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject. |
| IsAnimating | Checks whether a Avalonia.AvaloniaProperty is animating. Inherited from AvaloniaObject. |
| IsSet | Checks 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. |
| VerifyAccess | Checks 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
| Name | Description |
|---|---|
| Arcs | Gets or sets the collection of arcs. |
| Circles | Gets or sets the collection of circles. |
| IsLineAnimationEnabled | Gets or sets whether to animate line drawing. |
| Lines | Gets or sets the collection of lines. |
| Polygons | Gets or sets the collection of polygons. |
| Polylines | Gets or sets the collection of polylines. |
| IsVisible | Gets or sets whether this layer is visible. Inherited from MapLayer. |
| Opacity | Gets or sets the opacity of this layer. Inherited from MapLayer. |
| TooltipTemplate | Gets or sets the data template used for tooltips. Inherited from MapLayer. |
| Dispatcher | Returns the Avalonia.AvaloniaObject.Dispatcher that this Avalonia.AvaloniaObject is associated with. Inherited from AvaloniaObject. |
| Item | Inherited 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
| Name | Description |
|---|---|
| ArcsProperty | Identifies the Avalonia.Controls.Charts.VectorLayer.Arcs Avalonia property. |
| CirclesProperty | Identifies the Avalonia.Controls.Charts.VectorLayer.Circles Avalonia property. |
| IsLineAnimationEnabledProperty | Identifies the Avalonia.Controls.Charts.VectorLayer.IsLineAnimationEnabled Avalonia property. |
| LinesProperty | Identifies the Avalonia.Controls.Charts.VectorLayer.Lines Avalonia property. |
| PolygonsProperty | Identifies the Avalonia.Controls.Charts.VectorLayer.Polygons Avalonia property. |
| PolylinesProperty | Identifies the Avalonia.Controls.Charts.VectorLayer.Polylines Avalonia property. |
| IsVisibleProperty | Identifies the Avalonia.Controls.Charts.MapLayer.IsVisible Avalonia property. Inherited from MapLayer. |
| OpacityProperty | Identifies the Avalonia.Controls.Charts.MapLayer.Opacity Avalonia property. Inherited from MapLayer. |
| TooltipTemplateProperty | Identifies the Avalonia.Controls.Charts.MapLayer.TooltipTemplate Avalonia property. Inherited from MapLayer. |
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
| Name | Description |
|---|---|
| Invalidated | Event raised when the layer needs to be redrawn. Inherited from MapLayer. |
| PropertyChanged | Raised when a Avalonia.AvaloniaProperty value changes on this object. Inherited from AvaloniaObject. |