Search Results for

    Show / Hide Table of Contents

    Class MapControl

    Inheritance
    object
    AvaloniaObject
    Animatable
    StyledElement
    Visual
    Layoutable
    Interactive
    InputElement
    Control
    TemplatedControl
    ContentControl
    UserControl
    MapControl
    Implements
    IDataContextProvider
    ILogical
    IThemeVariantHost
    IResourceHost
    IResourceNode
    IStyleHost
    ISetLogicalParent
    ISetInheritanceParent
    ISupportInitialize
    IStyleable
    IInputElement
    IDataTemplateHost
    INamed
    ISetterValue
    IMapControl
    IDisposable
    INotifyPropertyChanged
    Inherited Members
    ContentControl.ContentProperty
    ContentControl.ContentTemplateProperty
    ContentControl.HorizontalContentAlignmentProperty
    ContentControl.VerticalContentAlignmentProperty
    ContentControl.RegisterContentPresenter(ContentPresenter)
    ContentControl.Content
    ContentControl.ContentTemplate
    ContentControl.Presenter
    ContentControl.HorizontalContentAlignment
    ContentControl.VerticalContentAlignment
    TemplatedControl.BackgroundProperty
    TemplatedControl.BorderBrushProperty
    TemplatedControl.BorderThicknessProperty
    TemplatedControl.CornerRadiusProperty
    TemplatedControl.FontFamilyProperty
    TemplatedControl.FontSizeProperty
    TemplatedControl.FontStyleProperty
    TemplatedControl.FontWeightProperty
    TemplatedControl.FontStretchProperty
    TemplatedControl.ForegroundProperty
    TemplatedControl.PaddingProperty
    TemplatedControl.TemplateProperty
    TemplatedControl.IsTemplateFocusTargetProperty
    TemplatedControl.TemplateAppliedEvent
    TemplatedControl.GetIsTemplateFocusTarget(Control)
    TemplatedControl.SetIsTemplateFocusTarget(Control, bool)
    TemplatedControl.ApplyTemplate()
    TemplatedControl.GetTemplateFocusTarget()
    TemplatedControl.OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs)
    TemplatedControl.OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs)
    TemplatedControl.OnApplyTemplate(TemplateAppliedEventArgs)
    TemplatedControl.OnTemplateChanged(AvaloniaPropertyChangedEventArgs)
    TemplatedControl.Background
    TemplatedControl.BorderBrush
    TemplatedControl.BorderThickness
    TemplatedControl.CornerRadius
    TemplatedControl.FontFamily
    TemplatedControl.FontSize
    TemplatedControl.FontStyle
    TemplatedControl.FontWeight
    TemplatedControl.FontStretch
    TemplatedControl.Foreground
    TemplatedControl.Padding
    TemplatedControl.Template
    TemplatedControl.TemplateApplied
    Control.FocusAdornerProperty
    Control.TagProperty
    Control.ContextMenuProperty
    Control.ContextFlyoutProperty
    Control.RequestBringIntoViewEvent
    Control.ContextRequestedEvent
    Control.LoadedEvent
    Control.UnloadedEvent
    Control.SizeChangedEvent
    Control.OnLoaded(RoutedEventArgs)
    Control.OnUnloaded(RoutedEventArgs)
    Control.OnSizeChanged(SizeChangedEventArgs)
    Control.OnAttachedToVisualTreeCore(VisualTreeAttachmentEventArgs)
    Control.OnDetachedFromVisualTreeCore(VisualTreeAttachmentEventArgs)
    Control.OnGotFocus(GotFocusEventArgs)
    Control.OnLostFocus(RoutedEventArgs)
    Control.OnCreateAutomationPeer()
    Control.OnPointerReleased(PointerReleasedEventArgs)
    Control.OnKeyUp(KeyEventArgs)
    Control.FocusAdorner
    Control.DataTemplates
    Control.ContextMenu
    Control.ContextFlyout
    Control.IsLoaded
    Control.Tag
    Control.ContextRequested
    Control.Loaded
    Control.Unloaded
    Control.SizeChanged
    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.PointerEnteredEvent
    InputElement.PointerExitedEvent
    InputElement.PointerMovedEvent
    InputElement.PointerPressedEvent
    InputElement.PointerReleasedEvent
    InputElement.PointerCaptureLostEvent
    InputElement.PointerWheelChangedEvent
    InputElement.TappedEvent
    InputElement.HoldingEvent
    InputElement.DoubleTappedEvent
    InputElement.Focus(NavigationMethod, KeyModifiers)
    InputElement.OnKeyDown(KeyEventArgs)
    InputElement.OnTextInput(TextInputEventArgs)
    InputElement.OnPointerEntered(PointerEventArgs)
    InputElement.OnPointerExited(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.PointerEntered
    InputElement.PointerExited
    InputElement.PointerMoved
    InputElement.PointerPressed
    InputElement.PointerReleased
    InputElement.PointerCaptureLost
    InputElement.PointerWheelChanged
    InputElement.Tapped
    InputElement.Holding
    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.UpdateLayout()
    Layoutable.Measure(Size)
    Layoutable.Arrange(Rect)
    Layoutable.InvalidateMeasure()
    Layoutable.InvalidateArrange()
    Layoutable.AffectsMeasure<T>(params AvaloniaProperty[])
    Layoutable.AffectsArrange<T>(params AvaloniaProperty[])
    Layoutable.MeasureCore(Size)
    Layoutable.MeasureOverride(Size)
    Layoutable.ArrangeCore(Rect)
    Layoutable.ArrangeOverride(Size)
    Layoutable.OnMeasureInvalidated()
    Layoutable.OnVisualParentChanged(Visual, Visual)
    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.ClipToBoundsProperty
    Visual.ClipProperty
    Visual.IsVisibleProperty
    Visual.OpacityProperty
    Visual.OpacityMaskProperty
    Visual.EffectProperty
    Visual.HasMirrorTransformProperty
    Visual.RenderTransformProperty
    Visual.RenderTransformOriginProperty
    Visual.FlowDirectionProperty
    Visual.VisualParentProperty
    Visual.ZIndexProperty
    Visual.GetFlowDirection(Visual)
    Visual.SetFlowDirection(Visual, FlowDirection)
    Visual.InvalidateVisual()
    Visual.AffectsRender<T>(params AvaloniaProperty[])
    Visual.LogicalChildrenCollectionChanged(object, NotifyCollectionChangedEventArgs)
    Visual.OnAttachedToVisualTree(VisualTreeAttachmentEventArgs)
    Visual.OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs)
    Visual.InvalidateMirrorTransform()
    Visual.Bounds
    Visual.ClipToBounds
    Visual.Clip
    Visual.IsEffectivelyVisible
    Visual.IsVisible
    Visual.Opacity
    Visual.OpacityMask
    Visual.Effect
    Visual.HasMirrorTransform
    Visual.RenderTransform
    Visual.RenderTransformOrigin
    Visual.FlowDirection
    Visual.ZIndex
    Visual.VisualChildren
    Visual.VisualRoot
    Visual.BypassFlowDirectionPolicies
    Visual.AttachedToVisualTree
    Visual.DetachedFromVisualTree
    StyledElement.DataContextProperty
    StyledElement.NameProperty
    StyledElement.ParentProperty
    StyledElement.TemplatedParentProperty
    StyledElement.ThemeProperty
    StyledElement.BeginInit()
    StyledElement.EndInit()
    StyledElement.ApplyStyling()
    StyledElement.InitializeIfNeeded()
    StyledElement.TryGetResource(object, ThemeVariant, out object)
    StyledElement.OnDataContextChanged(EventArgs)
    StyledElement.OnDataContextBeginUpdate()
    StyledElement.OnDataContextEndUpdate()
    StyledElement.OnInitialized()
    StyledElement.Name
    StyledElement.Classes
    StyledElement.DataContext
    StyledElement.IsInitialized
    StyledElement.Styles
    StyledElement.StyleKey
    StyledElement.Resources
    StyledElement.TemplatedParent
    StyledElement.Theme
    StyledElement.LogicalChildren
    StyledElement.PseudoClasses
    StyledElement.StyleKeyOverride
    StyledElement.Parent
    StyledElement.ActualThemeVariant
    StyledElement.AttachedToLogicalTree
    StyledElement.DetachedFromLogicalTree
    StyledElement.DataContextChanged
    StyledElement.Initialized
    StyledElement.ResourcesChanged
    StyledElement.ActualThemeVariantChanged
    Animatable.TransitionsProperty
    Animatable.OnPropertyChangedCore(AvaloniaPropertyChangedEventArgs)
    Animatable.Transitions
    AvaloniaObject.CheckAccess()
    AvaloniaObject.VerifyAccess()
    AvaloniaObject.ClearValue(AvaloniaProperty)
    AvaloniaObject.ClearValue<T>(AvaloniaProperty<T>)
    AvaloniaObject.ClearValue<T>(StyledProperty<T>)
    AvaloniaObject.ClearValue<T>(DirectPropertyBase<T>)
    AvaloniaObject.Equals(object)
    AvaloniaObject.GetHashCode()
    AvaloniaObject.GetValue(AvaloniaProperty)
    AvaloniaObject.GetValue<T>(StyledProperty<T>)
    AvaloniaObject.GetValue<T>(DirectPropertyBase<T>)
    AvaloniaObject.GetBaseValue<T>(StyledProperty<T>)
    AvaloniaObject.IsAnimating(AvaloniaProperty)
    AvaloniaObject.IsSet(AvaloniaProperty)
    AvaloniaObject.SetValue(AvaloniaProperty, object, BindingPriority)
    AvaloniaObject.SetValue<T>(StyledProperty<T>, T, BindingPriority)
    AvaloniaObject.SetValue<T>(DirectPropertyBase<T>, T)
    AvaloniaObject.SetCurrentValue(AvaloniaProperty, object)
    AvaloniaObject.SetCurrentValue<T>(StyledProperty<T>, T)
    AvaloniaObject.Bind(AvaloniaProperty, IObservable<object>, BindingPriority)
    AvaloniaObject.Bind<T>(StyledProperty<T>, IObservable<object>, BindingPriority)
    AvaloniaObject.Bind<T>(StyledProperty<T>, IObservable<T>, BindingPriority)
    AvaloniaObject.Bind<T>(StyledProperty<T>, IObservable<BindingValue<T>>, BindingPriority)
    AvaloniaObject.Bind<T>(DirectPropertyBase<T>, IObservable<object>)
    AvaloniaObject.Bind<T>(DirectPropertyBase<T>, IObservable<T>)
    AvaloniaObject.Bind<T>(DirectPropertyBase<T>, IObservable<BindingValue<T>>)
    AvaloniaObject.CoerceValue(AvaloniaProperty)
    AvaloniaObject.UpdateDataValidation(AvaloniaProperty, BindingValueType, Exception)
    AvaloniaObject.RaisePropertyChanged<T>(DirectPropertyBase<T>, T, T)
    AvaloniaObject.SetAndRaise<T>(DirectPropertyBase<T>, ref T, 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
    Assembly: Mapsui.UI.Avalonia.dll
    Syntax
    public class MapControl : UserControl, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, IInputElement, IDataTemplateHost, INamed, ISetterValue, IMapControl, IDisposable, INotifyPropertyChanged

    Constructors

    | Edit this page View Source

    MapControl()

    Declaration
    public MapControl()

    Properties

    | Edit this page View Source

    ContinuousMouseWheelZoomStepSize

    The size of the mouse wheel steps used when UseContinuousMouseWheelZoom = true. The default is 0.1. A step size of 1 would doubling or halving the scale of the map on each event.

    Declaration
    public double ContinuousMouseWheelZoomStepSize { get; set; }
    Property Value
    Type Description
    double
    | 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
    | Edit this page View Source

    UseContinuousMouseWheelZoom

    This enables an alternative mouse wheel method where the step size on each mouse wheel event can be configured by setting the ContinuousMouseWheelZoomStepSize.

    Declaration
    public bool UseContinuousMouseWheelZoom { get; set; }
    Property Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    CallHomeIfNeeded()

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

    ClearTouchState()

    Clears the Touch State

    Declaration
    public void ClearTouchState()
    | 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(AvaloniaPropertyChangedEventArgs)

    Called when a avalonia property changes on the object.

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

    The property change details.

    Overrides
    Avalonia.Controls.ContentControl.OnPropertyChanged(Avalonia.AvaloniaPropertyChangedEventArgs)
    | Edit this page View Source

    OnPropertyChanged(string)

    Declaration
    protected void OnPropertyChanged(string propertyName = "")
    Parameters
    Type Name Description
    string propertyName
    | 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.Visual.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.IDataContextProvider
    Avalonia.LogicalTree.ILogical
    Avalonia.Styling.IThemeVariantHost
    Avalonia.Controls.IResourceHost
    Avalonia.Controls.IResourceNode
    Avalonia.Styling.IStyleHost
    Avalonia.Controls.ISetLogicalParent
    Avalonia.Controls.ISetInheritanceParent
    ISupportInitialize
    Avalonia.Styling.IStyleable
    Avalonia.Input.IInputElement
    Avalonia.Controls.Templates.IDataTemplateHost
    Avalonia.INamed
    Avalonia.Styling.ISetterValue
    IMapControl
    IDisposable
    INotifyPropertyChanged
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX