Search Results for

    Show / Hide Table of Contents

    Class MapControl

    Inheritance
    object
    AvaloniaObject
    Animatable
    StyledElement
    Visual
    Layoutable
    Interactive
    InputElement
    Control
    Panel
    Grid
    MapControl
    Implements
    IAvaloniaObjectDebug
    ISetLogicalParent
    ISetInheritanceParent
    IVisualBrushInitialize
    ISetterValue
    IPanel
    IControl
    IDataTemplateHost
    ILayoutable
    IInputElement
    IVisual
    IInteractive
    IStyledElement
    IStyleable
    INamed
    IStyleHost
    ILogical
    IResourceHost
    IResourceNode
    IDataContextProvider
    IAvaloniaObject
    ISupportInitialize
    IChildIndexProvider
    IMapControl
    IDisposable
    INotifyPropertyChanged
    Inherited Members
    Grid.ShowGridLinesProperty
    Grid.ColumnProperty
    Grid.RowProperty
    Grid.ColumnSpanProperty
    Grid.RowSpanProperty
    Grid.IsSharedSizeScopeProperty
    Grid.SetColumn(Control, int)
    Grid.GetColumn(Control)
    Grid.SetRow(Control, int)
    Grid.GetRow(Control)
    Grid.SetColumnSpan(Control, int)
    Grid.GetColumnSpan(Control)
    Grid.SetRowSpan(Control, int)
    Grid.GetRowSpan(Control)
    Grid.SetIsSharedSizeScope(Control, bool)
    Grid.GetIsSharedSizeScope(Control)
    Grid.MeasureOverride(Size)
    Grid.ArrangeOverride(Size)
    Grid.ChildrenChanged(object, NotifyCollectionChangedEventArgs)
    Grid.ShowGridLines
    Grid.ColumnDefinitions
    Grid.RowDefinitions
    Panel.BackgroundProperty
    Panel.AffectsParentArrange<TPanel>(params AvaloniaProperty[])
    Panel.AffectsParentMeasure<TPanel>(params AvaloniaProperty[])
    Panel.TryGetTotalCount(out int)
    Panel.Children
    Panel.Background
    Control.FocusAdornerProperty
    Control.TagProperty
    Control.ContextMenuProperty
    Control.ContextFlyoutProperty
    Control.RequestBringIntoViewEvent
    Control.ContextRequestedEvent
    Control.GetTemplateFocusTarget()
    Control.OnAttachedToVisualTreeCore(VisualTreeAttachmentEventArgs)
    Control.OnDetachedFromVisualTreeCore(VisualTreeAttachmentEventArgs)
    Control.OnGotFocus(GotFocusEventArgs)
    Control.OnLostFocus(RoutedEventArgs)
    Control.OnPointerReleased(PointerReleasedEventArgs)
    Control.OnKeyUp(KeyEventArgs)
    Control.FocusAdorner
    Control.DataTemplates
    Control.ContextMenu
    Control.ContextFlyout
    Control.Tag
    Control.Parent
    Control.ContextRequested
    InputElement.FocusableProperty
    InputElement.IsEnabledProperty
    InputElement.IsEffectivelyEnabledProperty
    InputElement.CursorProperty
    InputElement.IsKeyboardFocusWithinProperty
    InputElement.IsFocusedProperty
    InputElement.IsHitTestVisibleProperty
    InputElement.IsPointerOverProperty
    InputElement.IsTabStopProperty
    InputElement.GotFocusEvent
    InputElement.LostFocusEvent
    InputElement.KeyDownEvent
    InputElement.KeyUpEvent
    InputElement.TabIndexProperty
    InputElement.TextInputEvent
    InputElement.TextInputMethodClientRequestedEvent
    InputElement.TextInputOptionsQueryEvent
    InputElement.PointerEnterEvent
    InputElement.PointerLeaveEvent
    InputElement.PointerMovedEvent
    InputElement.PointerPressedEvent
    InputElement.PointerReleasedEvent
    InputElement.PointerCaptureLostEvent
    InputElement.PointerWheelChangedEvent
    InputElement.TappedEvent
    InputElement.DoubleTappedEvent
    InputElement.Focus()
    InputElement.OnKeyDown(KeyEventArgs)
    InputElement.OnTextInput(TextInputEventArgs)
    InputElement.OnPointerEnter(PointerEventArgs)
    InputElement.OnPointerLeave(PointerEventArgs)
    InputElement.OnPointerPressed(PointerPressedEventArgs)
    InputElement.OnPointerCaptureLost(PointerCaptureLostEventArgs)
    InputElement.OnPointerWheelChanged(PointerWheelEventArgs)
    InputElement.UpdateIsEffectivelyEnabled()
    InputElement.Focusable
    InputElement.IsEnabled
    InputElement.Cursor
    InputElement.IsKeyboardFocusWithin
    InputElement.IsFocused
    InputElement.IsHitTestVisible
    InputElement.IsPointerOver
    InputElement.IsTabStop
    InputElement.IsEffectivelyEnabled
    InputElement.TabIndex
    InputElement.KeyBindings
    InputElement.IsEnabledCore
    InputElement.GestureRecognizers
    InputElement.GotFocus
    InputElement.LostFocus
    InputElement.KeyDown
    InputElement.KeyUp
    InputElement.TextInput
    InputElement.TextInputMethodClientRequested
    InputElement.TextInputOptionsQuery
    InputElement.PointerEnter
    InputElement.PointerLeave
    InputElement.PointerMoved
    InputElement.PointerPressed
    InputElement.PointerReleased
    InputElement.PointerCaptureLost
    InputElement.PointerWheelChanged
    InputElement.Tapped
    InputElement.DoubleTapped
    Interactive.AddHandler(RoutedEvent, Delegate, RoutingStrategies, bool)
    Interactive.AddHandler<TEventArgs>(RoutedEvent<TEventArgs>, EventHandler<TEventArgs>, RoutingStrategies, bool)
    Interactive.RemoveHandler(RoutedEvent, Delegate)
    Interactive.RemoveHandler<TEventArgs>(RoutedEvent<TEventArgs>, EventHandler<TEventArgs>)
    Interactive.RaiseEvent(RoutedEventArgs)
    Interactive.BuildEventRoute(RoutedEvent)
    Layoutable.DesiredSizeProperty
    Layoutable.WidthProperty
    Layoutable.HeightProperty
    Layoutable.MinWidthProperty
    Layoutable.MaxWidthProperty
    Layoutable.MinHeightProperty
    Layoutable.MaxHeightProperty
    Layoutable.MarginProperty
    Layoutable.HorizontalAlignmentProperty
    Layoutable.VerticalAlignmentProperty
    Layoutable.UseLayoutRoundingProperty
    Layoutable.ApplyTemplate()
    Layoutable.Measure(Size)
    Layoutable.Arrange(Rect)
    Layoutable.InvalidateMeasure()
    Layoutable.InvalidateArrange()
    Layoutable.AffectsMeasure(params AvaloniaProperty[])
    Layoutable.AffectsMeasure<T>(params AvaloniaProperty[])
    Layoutable.AffectsArrange(params AvaloniaProperty[])
    Layoutable.AffectsArrange<T>(params AvaloniaProperty[])
    Layoutable.MeasureCore(Size)
    Layoutable.ArrangeCore(Rect)
    Layoutable.InvalidateStyles()
    Layoutable.OnMeasureInvalidated()
    Layoutable.OnVisualParentChanged(IVisual, IVisual)
    Layoutable.Width
    Layoutable.Height
    Layoutable.MinWidth
    Layoutable.MaxWidth
    Layoutable.MinHeight
    Layoutable.MaxHeight
    Layoutable.Margin
    Layoutable.HorizontalAlignment
    Layoutable.VerticalAlignment
    Layoutable.DesiredSize
    Layoutable.IsMeasureValid
    Layoutable.IsArrangeValid
    Layoutable.UseLayoutRounding
    Layoutable.EffectiveViewportChanged
    Layoutable.LayoutUpdated
    Visual.BoundsProperty
    Visual.TransformedBoundsProperty
    Visual.ClipToBoundsProperty
    Visual.ClipProperty
    Visual.IsVisibleProperty
    Visual.OpacityProperty
    Visual.OpacityMaskProperty
    Visual.RenderTransformProperty
    Visual.RenderTransformOriginProperty
    Visual.VisualParentProperty
    Visual.ZIndexProperty
    Visual.InvalidateVisual()
    Visual.AffectsRender(params AvaloniaProperty[])
    Visual.AffectsRender<T>(params AvaloniaProperty[])
    Visual.LogicalChildrenCollectionChanged(object, NotifyCollectionChangedEventArgs)
    Visual.OnAttachedToVisualTree(VisualTreeAttachmentEventArgs)
    Visual.OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs)
    Visual.LogBindingError(AvaloniaProperty, Exception)
    Visual.Bounds
    Visual.TransformedBounds
    Visual.ClipToBounds
    Visual.Clip
    Visual.IsEffectivelyVisible
    Visual.IsVisible
    Visual.Opacity
    Visual.OpacityMask
    Visual.RenderTransform
    Visual.RenderTransformOrigin
    Visual.ZIndex
    Visual.VisualChildren
    Visual.VisualRoot
    Visual.AttachedToVisualTree
    Visual.DetachedFromVisualTree
    StyledElement.DataContextProperty
    StyledElement.NameProperty
    StyledElement.ParentProperty
    StyledElement.TemplatedParentProperty
    StyledElement.BeginInit()
    StyledElement.EndInit()
    StyledElement.ApplyStyling()
    StyledElement.InitializeIfNeeded()
    StyledElement.NotifyChildResourcesChanged(ResourcesChangedEventArgs)
    StyledElement.OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs)
    StyledElement.OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs)
    StyledElement.OnDataContextChanged(EventArgs)
    StyledElement.OnDataContextBeginUpdate()
    StyledElement.OnDataContextEndUpdate()
    StyledElement.OnInitialized()
    StyledElement.Name
    StyledElement.Classes
    StyledElement.DataContext
    StyledElement.IsInitialized
    StyledElement.Styles
    StyledElement.Resources
    StyledElement.TemplatedParent
    StyledElement.LogicalChildren
    StyledElement.PseudoClasses
    StyledElement.AttachedToLogicalTree
    StyledElement.DetachedFromLogicalTree
    StyledElement.DataContextChanged
    StyledElement.Initialized
    StyledElement.ResourcesChanged
    Animatable.ClockProperty
    Animatable.TransitionsProperty
    Animatable.EnableTransitions()
    Animatable.DisableTransitions()
    Animatable.OnPropertyChangedCore<T>(AvaloniaPropertyChangedEventArgs<T>)
    Animatable.Clock
    Animatable.Transitions
    AvaloniaObject.CheckAccess()
    AvaloniaObject.VerifyAccess()
    AvaloniaObject.ClearValue(AvaloniaProperty)
    AvaloniaObject.ClearValue<T>(AvaloniaProperty<T>)
    AvaloniaObject.ClearValue<T>(StyledPropertyBase<T>)
    AvaloniaObject.ClearValue<T>(DirectPropertyBase<T>)
    AvaloniaObject.Equals(object)
    AvaloniaObject.GetHashCode()
    AvaloniaObject.GetValue(AvaloniaProperty)
    AvaloniaObject.GetValue<T>(StyledPropertyBase<T>)
    AvaloniaObject.GetValue<T>(DirectPropertyBase<T>)
    AvaloniaObject.GetBaseValue<T>(StyledPropertyBase<T>, BindingPriority)
    AvaloniaObject.IsAnimating(AvaloniaProperty)
    AvaloniaObject.IsSet(AvaloniaProperty)
    AvaloniaObject.SetValue(AvaloniaProperty, object, BindingPriority)
    AvaloniaObject.SetValue<T>(StyledPropertyBase<T>, T, BindingPriority)
    AvaloniaObject.SetValue<T>(DirectPropertyBase<T>, T)
    AvaloniaObject.Bind<T>(StyledPropertyBase<T>, IObservable<BindingValue<T>>, BindingPriority)
    AvaloniaObject.Bind<T>(DirectPropertyBase<T>, IObservable<BindingValue<T>>)
    AvaloniaObject.CoerceValue<T>(StyledPropertyBase<T>)
    AvaloniaObject.BeginBatchUpdate()
    AvaloniaObject.EndBatchUpdate()
    AvaloniaObject.UpdateDataValidation<T>(AvaloniaProperty<T>, BindingValue<T>)
    AvaloniaObject.RaisePropertyChanged<T>(AvaloniaProperty<T>, Optional<T>, BindingValue<T>, BindingPriority)
    AvaloniaObject.SetAndRaise<T>(AvaloniaProperty<T>, ref T, T)
    AvaloniaObject.RaisePropertyChanged<T>(AvaloniaPropertyChangedEventArgs<T>)
    AvaloniaObject.InheritanceParent
    AvaloniaObject.this[AvaloniaProperty]
    AvaloniaObject.this[IndexerDescriptor]
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Mapsui.UI.Avalonia.V0
    Assembly: Mapsui.UI.Avalonia.V0.dll
    Syntax
    public class MapControl : Grid, IAvaloniaObjectDebug, ISetLogicalParent, ISetInheritanceParent, IVisualBrushInitialize, ISetterValue, IPanel, IControl, IDataTemplateHost, ILayoutable, IInputElement, IVisual, IInteractive, IStyledElement, IStyleable, INamed, IStyleHost, ILogical, IResourceHost, IResourceNode, IDataContextProvider, IAvaloniaObject, ISupportInitialize, IChildIndexProvider, IMapControl, IDisposable, INotifyPropertyChanged

    Constructors

    | Edit this page View Source

    MapControl()

    Declaration
    public MapControl()

    Properties

    | Edit this page View Source

    Map

    Map holding data for which is shown in this MapControl

    Declaration
    public Map Map { get; set; }
    Property Value
    Type Description
    Map
    | Edit this page View Source

    Performance

    Object to save performance information about the drawing of the map

    Declaration
    public Performance? Performance { get; set; }
    Property Value
    Type Description
    Performance
    Remarks

    If this is null, no performance information is saved.

    | Edit this page View Source

    PixelDensity

    The number of pixel per device independent unit

    Declaration
    public float PixelDensity { get; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    ReSnapRotationDegrees

    With how many degrees from 0 should map snap to 0 degrees

    Declaration
    public double ReSnapRotationDegrees { get; set; }
    Property Value
    Type Description
    double
    | Edit this page View Source

    Renderer

    Renderer that is used from this MapControl

    Declaration
    public IRenderer Renderer { get; set; }
    Property Value
    Type Description
    IRenderer
    | Edit this page View Source

    ShiftPressed

    Declaration
    public bool ShiftPressed { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    UnSnapRotationDegrees

    After how many degrees start rotation to take place

    Declaration
    public double UnSnapRotationDegrees { get; set; }
    Property Value
    Type Description
    double
    | Edit this page View Source

    UpdateInterval

    Interval between two redraws of the MapControl in ms

    Declaration
    public int UpdateInterval { get; set; }
    Property Value
    Type Description
    int

    Methods

    | Edit this page View Source

    CallHomeIfNeeded()

    Declaration
    public void CallHomeIfNeeded()
    | Edit this page View Source

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    Declaration
    public virtual void Dispose()
    | Edit this page View Source

    Dispose(bool)

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing
    | Edit this page View Source

    ForceUpdate()

    Force a update of control

    Declaration
    public void ForceUpdate()
    Remarks

    When this function is called, the control draws itself once

    | Edit this page View Source

    GetMapInfo(MPoint?, int)

    Check, if a feature at a given screen position is hit

    Declaration
    public MapInfo? GetMapInfo(MPoint? screenPosition, int margin = 0)
    Parameters
    Type Name Description
    MPoint screenPosition

    Screen position to check for widgets and features

    int margin

    An optional extra margin around the feature to enlarge the hit area.

    Returns
    Type Description
    MapInfo
    | Edit this page View Source

    GetSnapshot(IEnumerable<ILayer>?)

    Create a snapshot form map as PNG image

    Declaration
    public byte[] GetSnapshot(IEnumerable<ILayer>? layers = null)
    Parameters
    Type Name Description
    IEnumerable<ILayer> layers

    Layers that should be included in snapshot

    Returns
    Type Description
    byte[]

    Byte array with snapshot in png format. If there are any problems than returns null.

    | Edit this page View Source

    OnPointerMoved(PointerEventArgs)

    Called before the Avalonia.Input.InputElement.PointerMoved event occurs.

    Declaration
    protected override void OnPointerMoved(PointerEventArgs e)
    Parameters
    Type Name Description
    PointerEventArgs e

    The event args.

    Overrides
    Avalonia.Input.InputElement.OnPointerMoved(Avalonia.Input.PointerEventArgs)
    | Edit this page View Source

    OnPropertyChanged(string)

    Declaration
    protected void OnPropertyChanged(string propertyName = "")
    Parameters
    Type Name Description
    string propertyName
    | Edit this page View Source

    OnPropertyChanged<T>(AvaloniaPropertyChangedEventArgs<T>)

    Called when a avalonia property changes on the object.

    Declaration
    protected override void OnPropertyChanged<T>(AvaloniaPropertyChangedEventArgs<T> change)
    Parameters
    Type Name Description
    AvaloniaPropertyChangedEventArgs<T> change

    The property change details.

    Type Parameters
    Name Description
    T
    Overrides
    Avalonia.Input.InputElement.OnPropertyChanged<T>(Avalonia.AvaloniaPropertyChangedEventArgs<T>)
    | Edit this page View Source

    OpenBrowser(string)

    Declaration
    public void OpenBrowser(string url)
    Parameters
    Type Name Description
    string url
    | Edit this page View Source

    Refresh(ChangeType)

    Declaration
    public void Refresh(ChangeType changeType = ChangeType.Discrete)
    Parameters
    Type Name Description
    ChangeType changeType
    | Edit this page View Source

    RefreshData(ChangeType)

    Refresh data of Map, but don't paint it

    Declaration
    public void RefreshData(ChangeType changeType = ChangeType.Discrete)
    Parameters
    Type Name Description
    ChangeType changeType
    | Edit this page View Source

    RefreshGraphics()

    Declaration
    public void RefreshGraphics()
    | Edit this page View Source

    Render(DrawingContext)

    Renders the visual to a Avalonia.Media.DrawingContext.

    Declaration
    public override void Render(DrawingContext context)
    Parameters
    Type Name Description
    DrawingContext context

    The drawing context.

    Overrides
    Avalonia.Controls.Panel.Render(Avalonia.Media.DrawingContext)
    | Edit this page View Source

    ResetWidgetCache()

    Reset the widget cache. It may be necessary to call this explicitly after the widgets have changed.

    Declaration
    protected void ResetWidgetCache()
    | Edit this page View Source

    StartUpdates(bool)

    Start updates for control

    Declaration
    public void StartUpdates(bool refresh = true)
    Parameters
    Type Name Description
    bool refresh
    Remarks

    When this function is called, the control is redrawn if needed

    | Edit this page View Source

    StopUpdates()

    Stop updates for control

    Declaration
    public void StopUpdates()
    Remarks

    When this function is called, the control stops to redraw itself, even if it is needed

    | Edit this page View Source

    ToDeviceIndependentUnits(MPoint)

    Converts coordinates in pixels to device independent units (or DIP or DP).

    Declaration
    public MPoint ToDeviceIndependentUnits(MPoint coordinateInPixels)
    Parameters
    Type Name Description
    MPoint coordinateInPixels

    Coordinate in pixels

    Returns
    Type Description
    MPoint

    Coordinate in device independent units (or DIP or DP)

    | Edit this page View Source

    ToPixels(MPoint)

    Converts coordinates in device independent units (or DIP or DP) to pixels.

    Declaration
    public MPoint ToPixels(MPoint coordinateInDeviceIndependentUnits)
    Parameters
    Type Name Description
    MPoint coordinateInDeviceIndependentUnits

    Coordinate in device independent units (or DIP or DP)

    Returns
    Type Description
    MPoint

    Coordinate in pixels

    | Edit this page View Source

    Unsubscribe()

    Unsubscribe from map events

    Declaration
    public void Unsubscribe()

    Events

    | Edit this page View Source

    FeatureInfo

    Declaration
    public event EventHandler<FeatureInfoEventArgs>? FeatureInfo
    Event Type
    Type Description
    EventHandler<FeatureInfoEventArgs>
    | Edit this page View Source

    Info

    Called whenever the map is clicked. The MapInfoEventArgs contain the features that were hit in the layers that have IsMapInfoLayer set to true.

    Declaration
    public event EventHandler<MapInfoEventArgs>? Info
    Event Type
    Type Description
    EventHandler<MapInfoEventArgs>
    | Edit this page View Source

    PropertyChanged

    Called whenever a property is changed

    Declaration
    public event PropertyChangedEventHandler? PropertyChanged
    Event Type
    Type Description
    PropertyChangedEventHandler

    Implements

    Avalonia.Diagnostics.IAvaloniaObjectDebug
    Avalonia.Controls.ISetLogicalParent
    Avalonia.Controls.ISetInheritanceParent
    Avalonia.Rendering.IVisualBrushInitialize
    Avalonia.Styling.ISetterValue
    Avalonia.Controls.IPanel
    Avalonia.Controls.IControl
    Avalonia.Controls.Templates.IDataTemplateHost
    Avalonia.Layout.ILayoutable
    Avalonia.Input.IInputElement
    Avalonia.VisualTree.IVisual
    Avalonia.Interactivity.IInteractive
    Avalonia.IStyledElement
    Avalonia.Styling.IStyleable
    Avalonia.INamed
    Avalonia.Styling.IStyleHost
    Avalonia.LogicalTree.ILogical
    Avalonia.Controls.IResourceHost
    Avalonia.Controls.IResourceNode
    Avalonia.IDataContextProvider
    Avalonia.IAvaloniaObject
    ISupportInitialize
    Avalonia.LogicalTree.IChildIndexProvider
    IMapControl
    IDisposable
    INotifyPropertyChanged
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX