MarkerLayer Class
Definition
A layer that renders individual MapMarker items.
public class MarkerLayer
Constructors
| Name | Description |
|---|---|
| MarkerLayer | Initializes a new instance of the Avalonia.Controls.Charts.MarkerLayer class. |
MarkerLayer Constructor
Initializes a new instance of the Avalonia.Controls.Charts.MarkerLayer class.
public MarkerLayer()
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. |
| GetPointData | Gets the data item at the specified screen point. |
| OnPointerExited | Handles pointer exited events. Override this method to handle interactions (e.g. clearing hover effects). |
| OnPointerMoved | Handles pointer moved events. Override this method to handle interactions (e.g. hover effects). |
| Render | Renders this layer to the drawing context. |
| 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>
GetPointData Method
Gets the data item at the specified screen point.
public object GetPointData(Avalonia.Point point, Avalonia.Rect chartArea)
Parameters
point Avalonia.Point
The screen point to test.
chartArea Avalonia.Rect
The chart area rectangle.
Returns
object
The data item if hit; otherwise, null.
OnPointerExited Method
Handles pointer exited events. Override this method to handle interactions (e.g. clearing hover effects).
public void OnPointerExited()
OnPointerMoved Method
Handles pointer moved events. Override this method to handle interactions (e.g. hover effects).
public bool OnPointerMoved(Avalonia.Point point, Avalonia.Rect chartArea)
Parameters
point Avalonia.Point
chartArea Avalonia.Rect
Returns
bool
True if handled.
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 |
|---|---|
| Fill | Gets or sets the default fill brush for markers from ItemsSource. |
| ItemsSource | Gets or sets the data source. |
| LabelPath | Gets or sets the path to the label property in the ItemsSource. |
| LatitudePath | Gets or sets the path to the latitude property in the ItemsSource. |
| LongitudePath | Gets or sets the path to the longitude property in the ItemsSource. |
| MarkerSize | Gets or sets the default size for markers from ItemsSource. |
| MarkerType | Gets or sets the default marker type for markers from ItemsSource. |
| Markers | Gets or sets the collection of markers. |
| Stroke | Gets or sets the default stroke brush for markers from ItemsSource. |
| 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. |
Fill Property
Gets or sets the default fill brush for markers from ItemsSource.
public Avalonia.Media.IBrush Fill { get; set; }
ItemsSource Property
Gets or sets the data source.
public System.Collections.IEnumerable ItemsSource { get; set; }
LabelPath Property
Gets or sets the path to the label property in the ItemsSource.
public string LabelPath { get; set; }
LatitudePath Property
Gets or sets the path to the latitude property in the ItemsSource.
public string LatitudePath { get; set; }
LongitudePath Property
Gets or sets the path to the longitude property in the ItemsSource.
public string LongitudePath { get; set; }
MarkerSize Property
Gets or sets the default size for markers from ItemsSource.
public double MarkerSize { get; set; }
MarkerType Property
Gets or sets the default marker type for markers from ItemsSource.
public Avalonia.Controls.Charts.MapIconType MarkerType { get; set; }
Markers Property
Gets or sets the collection of markers.
public System.Collections.Generic.IList<Avalonia.Controls.Charts.MapMarker> Markers { get; set; }
Stroke Property
Gets or sets the default stroke brush for markers from ItemsSource.
public Avalonia.Media.IBrush Stroke { get; set; }
Fields
FillProperty Field
Identifies the Avalonia.Controls.Charts.MarkerLayer.Fill Avalonia property.
public Avalonia.StyledProperty<Avalonia.Media.IBrush> FillProperty
ItemsSourceProperty Field
Identifies the Avalonia.Controls.Charts.MarkerLayer.ItemsSource Avalonia property.
public Avalonia.StyledProperty<System.Collections.IEnumerable> ItemsSourceProperty
LabelPathProperty Field
Identifies the Avalonia.Controls.Charts.MarkerLayer.LabelPath Avalonia property.
public Avalonia.StyledProperty<string> LabelPathProperty
LatitudePathProperty Field
Identifies the Avalonia.Controls.Charts.MarkerLayer.LatitudePath Avalonia property.
public Avalonia.StyledProperty<string> LatitudePathProperty
LongitudePathProperty Field
Identifies the Avalonia.Controls.Charts.MarkerLayer.LongitudePath Avalonia property.
public Avalonia.StyledProperty<string> LongitudePathProperty
MarkerSizeProperty Field
Identifies the Avalonia.Controls.Charts.MarkerLayer.MarkerSize Avalonia property.
public Avalonia.StyledProperty<double> MarkerSizeProperty
MarkerTypeProperty Field
Identifies the Avalonia.Controls.Charts.MarkerLayer.MarkerType Avalonia property.
public Avalonia.StyledProperty<Avalonia.Controls.Charts.MapIconType> MarkerTypeProperty
MarkersProperty Field
Identifies the Avalonia.Controls.Charts.MarkerLayer.Markers Avalonia property.
public Avalonia.StyledProperty<System.Collections.Generic.IList<Avalonia.Controls.Charts.MapMarker>> MarkersProperty
StrokeProperty Field
Identifies the Avalonia.Controls.Charts.MarkerLayer.Stroke Avalonia property.
public Avalonia.StyledProperty<Avalonia.Media.IBrush> StrokeProperty
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. |