Search Results for

    Show / Hide Table of Contents

    Class MapControl

    Inheritance
    object
    Widget
    BindableWidget
    Control
    Container
    Panel
    Drawable
    SkiaDrawable
    MapControl
    Implements
    IHandlerSource
    IBindable
    IMouseInputSource
    IKeyboardInputSource
    ICallbackSource
    IBindableWidgetContainer
    IMapControl
    INotifyPropertyChanged
    IDisposable
    Inherited Members
    SkiaDrawable.OnPaint(PaintEventArgs)
    SkiaDrawable.Paint
    Drawable.CreateGraphics()
    Drawable.Update(Rectangle)
    Drawable.GetCallback()
    Drawable.SupportsCreateGraphics
    Drawable.CanFocus
    Panel.Remove(Control)
    Panel.Controls
    Panel.Padding
    Panel.MinimumSize
    Panel.ContextMenu
    Panel.Content
    Container.ApplyStyles(object, string)
    Container.OnStyleChanged(EventArgs)
    Container.OnPreLoad(EventArgs)
    Container.OnLoad(EventArgs)
    Container.OnUnLoad(EventArgs)
    Container.Remove(IEnumerable<Control>)
    Container.RemoveAll()
    Container.RemoveParent(Control)
    Container.SetLogicalParent(Control)
    Container.RemoveLogicalParent(Control)
    Container.SetParent(Control, Action, Control)
    Container.FindChild<T>(string)
    Container.FindChild(Type, string)
    Container.FindChild(string)
    Container.ClientSize
    Container.Children
    Container.VisualChildren
    Container.StyleProvider
    Container.Styles
    Control.SizeChangedEvent
    Control.KeyDownEvent
    Control.KeyUpEvent
    Control.TextInputEvent
    Control.MouseDownEvent
    Control.MouseUpEvent
    Control.MouseMoveEvent
    Control.MouseLeaveEvent
    Control.MouseEnterEvent
    Control.MouseDoubleClickEvent
    Control.MouseWheelEvent
    Control.GotFocusEvent
    Control.LostFocusEvent
    Control.ShownEvent
    Control.DragDropEvent
    Control.DragOverEvent
    Control.DragEnterEvent
    Control.DragLeaveEvent
    Control.DragEndEvent
    Control.EnabledChangedEvent
    Control.OnTextInput(TextInputEventArgs)
    Control.OnMouseLeave(MouseEventArgs)
    Control.OnMouseEnter(MouseEventArgs)
    Control.OnMouseDoubleClick(MouseEventArgs)
    Control.OnGotFocus(EventArgs)
    Control.OnLostFocus(EventArgs)
    Control.OnShown(EventArgs)
    Control.OnDragDrop(DragEventArgs)
    Control.OnDragOver(DragEventArgs)
    Control.OnDragEnter(DragEventArgs)
    Control.OnDragLeave(DragEventArgs)
    Control.OnDragEnd(DragEventArgs)
    Control.OnEnabledChanged(EventArgs)
    Control.Invalidate()
    Control.Invalidate(bool)
    Control.Invalidate(Rectangle)
    Control.Invalidate(Rectangle, bool)
    Control.UpdateLayout()
    Control.GetPreferredSize()
    Control.GetPreferredSize(SizeF)
    Control.FindParent(Type, string)
    Control.FindParent(string)
    Control.Detach()
    Control.AttachNative()
    Control.DetachNative()
    Control.Focus()
    Control.SuspendLayout()
    Control.ResumeLayout()
    Control.MapPlatformCommand(string, Command)
    Control.PointFromScreen(PointF)
    Control.PointToScreen(PointF)
    Control.RectangleToScreen(RectangleF)
    Control.RectangleFromScreen(RectangleF)
    Control.DoDragDrop(DataObject, DragEffects)
    Control.DoDragDrop(DataObject, DragEffects, Image, PointF)
    Control.TriggerStyleChanged()
    Control.OnApplyCascadingStyles()
    Control.Print()
    Control.Handler
    Control.Loaded
    Control.VisualControls
    Control.Tag
    Control.LogicalParent
    Control.IsVisualControl
    Control.Size
    Control.Width
    Control.Height
    Control.Enabled
    Control.Visible
    Control.Parent
    Control.VisualParent
    Control.IsAttached
    Control.BackgroundColor
    Control.HasFocus
    Control.IsSuspended
    Control.ParentWindow
    Control.SupportedPlatformCommands
    Control.Bounds
    Control.Location
    Control.Cursor
    Control.ToolTip
    Control.TabIndex
    Control.AllowDrop
    Control.SizeChanged
    Control.KeyDown
    Control.KeyUp
    Control.TextInput
    Control.MouseDown
    Control.MouseUp
    Control.MouseMove
    Control.MouseLeave
    Control.MouseEnter
    Control.MouseDoubleClick
    Control.MouseWheel
    Control.GotFocus
    Control.LostFocus
    Control.Shown
    Control.PreLoad
    Control.Load
    Control.LoadComplete
    Control.UnLoad
    Control.DragDrop
    Control.DragOver
    Control.DragEnter
    Control.DragLeave
    Control.DragEnd
    Control.EnabledChanged
    BindableWidget.OnDataContextChanged(EventArgs)
    BindableWidget.FindParent<T>(string)
    BindableWidget.Unbind()
    BindableWidget.UpdateBindings(BindingUpdateMode)
    BindableWidget.Parents
    BindableWidget.DataContext
    BindableWidget.Bindings
    BindableWidget.IsDataContextChanging
    BindableWidget.DataContextChanged
    Widget.RegisterEvent<T>(Expression<Action<T>>, string)
    Widget.Initialize()
    Widget.Dispose()
    Widget.ToString()
    Widget.Platform
    Widget.NativeHandle
    Widget.Properties
    Widget.ID
    Widget.Style
    Widget.ControlObject
    Widget.IsDisposed
    Widget.StyleChanged
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Mapsui.UI.Eto
    Assembly: Mapsui.UI.Eto.dll
    Syntax
    public class MapControl : SkiaDrawable, IHandlerSource, IBindable, IMouseInputSource, IKeyboardInputSource, ICallbackSource, IBindableWidgetContainer, IMapControl, INotifyPropertyChanged, IDisposable

    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

    MaxTapGestureMovement

    The movement allowed between a touch down and touch up in a touch gestures in device independent pixels.

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

    MoveButton

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

    MoveCursor

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

    MoveModifier

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

    UseFling

    Use fling gesture to move the map. Default is true. Fling means that the map will continue to move for a short time after the user has lifted the finger.

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

    ZoomButton

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

    ZoomModifier

    Declaration
    public Keys ZoomModifier { get; set; }
    Property Value
    Type Description
    Keys

    Methods

    | Edit this page View Source

    Dispose(bool)

    Handles the disposal of this control

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    True if the caller called Eto.Widget.Dispose() manually, false if being called from a finalizer

    Overrides
    Control.Dispose(bool)
    | 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(ScreenPosition, IEnumerable<ILayer>)

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

    Declaration
    public MapInfo GetMapInfo(ScreenPosition screenPosition, IEnumerable<ILayer> layers)
    Parameters
    Type Name Description
    ScreenPosition screenPosition

    Screen position to check for widgets and features.

    IEnumerable<ILayer> layers

    The layers to query.

    Returns
    Type Description
    MapInfo
    | Edit this page View Source

    GetPixelDensity()

    Returns the number of pixels per device independent unit

    Declaration
    public float? GetPixelDensity()
    Returns
    Type Description
    float?
    | Edit this page View Source

    GetRemoteMapInfoAsync(ScreenPosition, Viewport, IEnumerable<ILayer>)

    Declaration
    protected Task<MapInfo> GetRemoteMapInfoAsync(ScreenPosition screenPosition, Viewport viewport, IEnumerable<ILayer> layers)
    Parameters
    Type Name Description
    ScreenPosition screenPosition
    Viewport viewport
    IEnumerable<ILayer> layers
    Returns
    Type Description
    Task<MapInfo>
    | Edit this page View Source

    GetSnapshot(IEnumerable<ILayer>?, RenderFormat, int)

    Create a snapshot form map as PNG image

    Declaration
    public byte[] GetSnapshot(IEnumerable<ILayer>? layers = null, RenderFormat renderFormat = RenderFormat.Png, int quality = 100)
    Parameters
    Type Name Description
    IEnumerable<ILayer> layers

    Layers that should be included in snapshot

    RenderFormat renderFormat

    render format

    int quality

    default quality is 90 is applicable for webp and jpg

    Returns
    Type Description
    byte[]

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

    | Edit this page View Source

    InvalidateCanvas()

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

    OnKeyDown(KeyEventArgs)

    Raises the Eto.Forms.Control.KeyDown event.

    Declaration
    protected override void OnKeyDown(KeyEventArgs e)
    Parameters
    Type Name Description
    KeyEventArgs e

    Key event arguments

    Overrides
    Eto.Forms.Control.OnKeyDown(Eto.Forms.KeyEventArgs)
    | Edit this page View Source

    OnKeyUp(KeyEventArgs)

    Raises the Eto.Forms.Control.KeyUp event.

    Declaration
    protected override void OnKeyUp(KeyEventArgs e)
    Parameters
    Type Name Description
    KeyEventArgs e

    Key event arguments

    Overrides
    Eto.Forms.Control.OnKeyUp(Eto.Forms.KeyEventArgs)
    | Edit this page View Source

    OnLoadComplete(EventArgs)

    Raises the Eto.Forms.Control.LoadComplete event, and recurses to this container's children

    Declaration
    protected override void OnLoadComplete(EventArgs e)
    Parameters
    Type Name Description
    EventArgs e

    Event arguments

    Overrides
    Container.OnLoadComplete(EventArgs)
    | Edit this page View Source

    OnMapInfo(MapInfoEventArgs)

    Declaration
    protected void OnMapInfo(MapInfoEventArgs mapInfoEventArgs)
    Parameters
    Type Name Description
    MapInfoEventArgs mapInfoEventArgs
    | Edit this page View Source

    OnMapPointerMoved(ScreenPosition, MPoint, GestureType)

    Declaration
    protected virtual bool OnMapPointerMoved(ScreenPosition screenPosition, MPoint worldPosition, GestureType gestureType)
    Parameters
    Type Name Description
    ScreenPosition screenPosition
    MPoint worldPosition
    GestureType gestureType
    Returns
    Type Description
    bool
    | Edit this page View Source

    OnMapPointerPressed(ScreenPosition, MPoint)

    Declaration
    protected virtual bool OnMapPointerPressed(ScreenPosition screenPosition, MPoint worldPosition)
    Parameters
    Type Name Description
    ScreenPosition screenPosition
    MPoint worldPosition
    Returns
    Type Description
    bool
    | Edit this page View Source

    OnMapPointerReleased(ScreenPosition, MPoint)

    Declaration
    protected virtual bool OnMapPointerReleased(ScreenPosition screenPosition, MPoint worldPosition)
    Parameters
    Type Name Description
    ScreenPosition screenPosition
    MPoint worldPosition
    Returns
    Type Description
    bool
    | Edit this page View Source

    OnMapTapped(ScreenPosition, MPoint, GestureType)

    Declaration
    protected virtual bool OnMapTapped(ScreenPosition screenPosition, MPoint worldPosition, GestureType gestureType)
    Parameters
    Type Name Description
    ScreenPosition screenPosition
    MPoint worldPosition
    GestureType gestureType
    Returns
    Type Description
    bool
    | Edit this page View Source

    OnMouseDown(MouseEventArgs)

    Raises the Eto.Forms.Control.MouseDown event.

    Declaration
    protected override void OnMouseDown(MouseEventArgs e)
    Parameters
    Type Name Description
    MouseEventArgs e

    Event arguments

    Overrides
    Eto.Forms.Control.OnMouseDown(Eto.Forms.MouseEventArgs)
    Remarks

    To override default behaviour of the control, set Eto.Forms.MouseEventArgs.Handled property to true.

    | Edit this page View Source

    OnMouseMove(MouseEventArgs)

    Raises the Eto.Forms.Control.MouseMove event.

    Declaration
    protected override void OnMouseMove(MouseEventArgs e)
    Parameters
    Type Name Description
    MouseEventArgs e

    Mouse event args

    Overrides
    Eto.Forms.Control.OnMouseMove(Eto.Forms.MouseEventArgs)
    | Edit this page View Source

    OnMouseUp(MouseEventArgs)

    Raises the Eto.Forms.Control.MouseUp event.

    Declaration
    protected override void OnMouseUp(MouseEventArgs e)
    Parameters
    Type Name Description
    MouseEventArgs e

    Event arguments

    Overrides
    Eto.Forms.Control.OnMouseUp(Eto.Forms.MouseEventArgs)
    | Edit this page View Source

    OnMouseWheel(MouseEventArgs)

    Raises the Eto.Forms.Control.MouseWheel event.

    Declaration
    protected override void OnMouseWheel(MouseEventArgs e)
    Parameters
    Type Name Description
    MouseEventArgs e

    Event arguments

    Overrides
    Eto.Forms.Control.OnMouseWheel(Eto.Forms.MouseEventArgs)
    | Edit this page View Source

    OnPaint(SKPaintEventArgs)

    Declaration
    protected override void OnPaint(SKPaintEventArgs e)
    Parameters
    Type Name Description
    SKPaintEventArgs e
    Overrides
    Eto.SkiaDraw.SkiaDrawable.OnPaint(Eto.SkiaDraw.SKPaintEventArgs)
    | Edit this page View Source

    OnPropertyChanged(string)

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

    OnSizeChanged(EventArgs)

    Raises the Eto.Forms.Control.SizeChanged event.

    Declaration
    protected override void OnSizeChanged(EventArgs e)
    Parameters
    Type Name Description
    EventArgs e

    Event arguments

    Overrides
    Control.OnSizeChanged(EventArgs)
    | Edit this page View Source

    OpenInBrowser(string)

    Declaration
    public void OpenInBrowser(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

    SetMapRenderer(IMapRenderer)

    Declaration
    public void SetMapRenderer(IMapRenderer mapRenderer)
    Parameters
    Type Name Description
    IMapRenderer mapRenderer
    | Edit this page View Source

    Unsubscribe()

    Unsubscribe from map events

    Declaration
    public void Unsubscribe()

    Events

    | 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>
    Remarks

    The Map.Tapped event is preferred over the Info event. This event is kept for backwards compatibility.

    | Edit this page View Source

    MapPointerMoved

    Event that is triggered when on pointer move. Can be a drag or hover.

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

    MapPointerPressed

    Event that is triggered when on pointer down.

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

    MapPointerReleased

    Event that is triggered when on pointer up.

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

    MapTapped

    Event that is triggered when the map is tapped. Can be a single tap, double tap or long press.

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

    PropertyChanged

    Called whenever a property is changed

    Declaration
    public event PropertyChangedEventHandler? PropertyChanged
    Event Type
    Type Description
    PropertyChangedEventHandler

    Implements

    Eto.IHandlerSource
    Eto.Forms.IBindable
    Eto.Forms.IMouseInputSource
    Eto.Forms.IKeyboardInputSource
    Eto.ICallbackSource
    Eto.Forms.IBindableWidgetContainer
    IMapControl
    INotifyPropertyChanged
    IDisposable

    Extension Methods

    DisposableExtension.DisposeIfDisposable(object?)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX