Search Results for

    Show / Hide Table of Contents

    Class MapControl

    Class, that uses the API of all other Mapsui MapControls

    Inheritance
    object
    BindableObject
    Element
    NavigableElement
    VisualElement
    View
    Layout
    TemplatedView
    ContentView
    MapControl
    MapView
    Implements
    IAnimatable
    ITabStopElement
    IViewController
    IVisualElementController
    IElementController
    IGestureController
    IGestureRecognizers
    ILayout
    ILayoutController
    IMapControl
    IDisposable
    INotifyPropertyChanged
    Inherited Members
    ContentView.ContentProperty
    ContentView.OnBindingContextChanged()
    ContentView.Content
    TemplatedView.ControlTemplateProperty
    TemplatedView.LayoutChildren(double, double, double, double)
    TemplatedView.OnApplyTemplate()
    TemplatedView.OnChildRemoved(Element)
    TemplatedView.OnChildRemoved(Element, int)
    TemplatedView.GetTemplateChild(string)
    TemplatedView.ResolveControlTemplate()
    TemplatedView.ControlTemplate
    Layout.IsClippedToBoundsProperty
    Layout.CascadeInputTransparentProperty
    Layout.PaddingProperty
    Layout.ForceLayout()
    Layout.LayoutChildIntoBoundingRegion(VisualElement, Rectangle)
    Layout.LowerChild(View)
    Layout.RaiseChild(View)
    Layout.InvalidateLayout()
    Layout.OnChildMeasureInvalidated(object, EventArgs)
    Layout.OnChildMeasureInvalidated()
    Layout.OnSizeAllocated(double, double)
    Layout.ShouldInvalidateOnChildAdded(View)
    Layout.ShouldInvalidateOnChildRemoved(View)
    Layout.UpdateChildrenLayout()
    Layout.ResolveLayoutChanges()
    Layout.IsClippedToBounds
    Layout.Padding
    Layout.CascadeInputTransparent
    Layout.LayoutChanged
    View.VerticalOptionsProperty
    View.HorizontalOptionsProperty
    View.MarginProperty
    View.GetChildElements(Point)
    View.GestureController
    View.GestureRecognizers
    View.HorizontalOptions
    View.Margin
    View.VerticalOptions
    VisualElement.NavigationProperty
    VisualElement.StyleProperty
    VisualElement.InputTransparentProperty
    VisualElement.IsEnabledProperty
    VisualElement.XProperty
    VisualElement.YProperty
    VisualElement.AnchorXProperty
    VisualElement.AnchorYProperty
    VisualElement.TranslationXProperty
    VisualElement.TranslationYProperty
    VisualElement.WidthProperty
    VisualElement.HeightProperty
    VisualElement.RotationProperty
    VisualElement.RotationXProperty
    VisualElement.RotationYProperty
    VisualElement.ScaleProperty
    VisualElement.ScaleXProperty
    VisualElement.ScaleYProperty
    VisualElement.ClipProperty
    VisualElement.VisualProperty
    VisualElement.IsVisibleProperty
    VisualElement.OpacityProperty
    VisualElement.BackgroundColorProperty
    VisualElement.BackgroundProperty
    VisualElement.BehaviorsProperty
    VisualElement.TriggersProperty
    VisualElement.WidthRequestProperty
    VisualElement.HeightRequestProperty
    VisualElement.MinimumWidthRequestProperty
    VisualElement.MinimumHeightRequestProperty
    VisualElement.IsFocusedProperty
    VisualElement.FlowDirectionProperty
    VisualElement.TabIndexProperty
    VisualElement.IsTabStopProperty
    VisualElement.OnTabIndexPropertyChanged(int, int)
    VisualElement.TabIndexDefaultValueCreator()
    VisualElement.OnTabStopPropertyChanged(bool, bool)
    VisualElement.TabStopDefaultValueCreator()
    VisualElement.BatchBegin()
    VisualElement.BatchCommit()
    VisualElement.Focus()
    VisualElement.Layout(Rectangle)
    VisualElement.Measure(double, double, MeasureFlags)
    VisualElement.Unfocus()
    VisualElement.InvalidateMeasure()
    VisualElement.OnChildAdded(Element)
    VisualElement.OnChildrenReordered()
    VisualElement.OnMeasure(double, double)
    VisualElement.SizeAllocated(double, double)
    VisualElement.ChangeVisualState()
    VisualElement.Visual
    VisualElement.FlowDirection
    VisualElement.AnchorX
    VisualElement.AnchorY
    VisualElement.BackgroundColor
    VisualElement.Background
    VisualElement.Behaviors
    VisualElement.Bounds
    VisualElement.Height
    VisualElement.HeightRequest
    VisualElement.InputTransparent
    VisualElement.IsEnabled
    VisualElement.IsFocused
    VisualElement.IsVisible
    VisualElement.MinimumHeightRequest
    VisualElement.MinimumWidthRequest
    VisualElement.Opacity
    VisualElement.Rotation
    VisualElement.RotationX
    VisualElement.RotationY
    VisualElement.Scale
    VisualElement.ScaleX
    VisualElement.ScaleY
    VisualElement.TabIndex
    VisualElement.IsTabStop
    VisualElement.TranslationX
    VisualElement.TranslationY
    VisualElement.Triggers
    VisualElement.Width
    VisualElement.WidthRequest
    VisualElement.X
    VisualElement.Y
    VisualElement.Clip
    VisualElement.Resources
    VisualElement.ChildrenReordered
    VisualElement.Focused
    VisualElement.MeasureInvalidated
    VisualElement.SizeChanged
    VisualElement.Unfocused
    NavigableElement.OnParentSet()
    NavigableElement.Navigation
    NavigableElement.Style
    NavigableElement.StyleClass
    NavigableElement.class
    Element.MenuProperty
    Element.AutomationIdProperty
    Element.ClassIdProperty
    Element.GetMenu(BindableObject)
    Element.SetMenu(BindableObject, Menu)
    Element.FindByName(string)
    Element.RemoveDynamicResource(BindableProperty)
    Element.SetDynamicResource(BindableProperty, string)
    Element.AutomationId
    Element.ClassId
    Element.Effects
    Element.Id
    Element.StyleId
    Element.Parent
    Element.ChildAdded
    Element.ChildRemoved
    Element.DescendantAdded
    Element.DescendantRemoved
    BindableObject.BindingContextProperty
    BindableObject.ClearValue(BindableProperty)
    BindableObject.ClearValue(BindablePropertyKey)
    BindableObject.GetValue(BindableProperty)
    BindableObject.IsSet(BindableProperty)
    BindableObject.RemoveBinding(BindableProperty)
    BindableObject.SetBinding(BindableProperty, BindingBase)
    BindableObject.ApplyBindings()
    BindableObject.OnPropertyChanging(string)
    BindableObject.UnapplyBindings()
    BindableObject.SetValue(BindableProperty, object)
    BindableObject.SetValue(BindablePropertyKey, object)
    BindableObject.CoerceValue(BindableProperty)
    BindableObject.CoerceValue(BindablePropertyKey)
    BindableObject.Dispatcher
    BindableObject.BindingContext
    BindableObject.PropertyChanging
    BindableObject.BindingContextChanged
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Mapsui.UI.Forms
    Assembly: Mapsui.UI.Forms.dll
    Syntax
    public class MapControl : ContentView, IAnimatable, ITabStopElement, IViewController, IVisualElementController, IElementController, IGestureController, IGestureRecognizers, ILayout, ILayoutController, IMapControl, IDisposable, INotifyPropertyChanged

    Constructors

    | Edit this page View Source

    MapControl()

    Declaration
    public MapControl()

    Fields

    | Edit this page View Source

    UseDoubleTap

    Declaration
    public bool UseDoubleTap
    Field Value
    Type Description
    bool
    | Edit this page View Source

    UseFling

    Declaration
    public bool UseFling
    Field Value
    Type Description
    bool
    | Edit this page View Source

    UseGPU

    Declaration
    public static bool UseGPU
    Field Value
    Type Description
    bool
    | Edit this page View Source

    _initialized

    Declaration
    protected readonly bool _initialized
    Field Value
    Type Description
    bool

    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

    RenderCache

    Declaration
    public IRenderCache RenderCache { get; }
    Property Value
    Type Description
    IRenderCache
    | 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

    ScreenHeight

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

    ScreenWidth

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

    ShiftPessed

    Declaration
    public bool ShiftPessed { 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

    ClearTouchState()

    Clears the Touch State

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

    Dispose()

    Declaration
    public 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

    ~MapControl()

    Declaration
    protected ~MapControl()
    | 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

    OnPropertyChanged(string)

    Method that is called when a bound property is changed.

    Declaration
    protected override void OnPropertyChanged(string propertyName = "")
    Parameters
    Type Name Description
    string propertyName

    The name of the bound property that changed.

    Overrides
    Element.OnPropertyChanged(string)
    Remarks

    To be added.

    | Edit this page View Source

    OpenBrowser(string)

    Public functions

    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

    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

    RunOnUIThread(Action)

    Declaration
    protected void RunOnUIThread(Action action)
    Parameters
    Type Name Description
    Action action
    | 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

    DoubleTap

    DoubleTap is called, when user clicks with a mouse button or tap with a finger two or more times on map

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

    Fling

    Fling is called, when user release mouse button or lift finger while moving with a certain speed

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

    Hovered

    Hover is called, when user move mouse over map without pressing mouse button

    Declaration
    public event EventHandler<HoveredEventArgs>? Hovered
    Event Type
    Type Description
    EventHandler<HoveredEventArgs>
    | 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

    LongTap

    LongTap is called, when user clicks with a mouse button or tap with a finger on map for 500 ms

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

    PropertyChanged

    Called whenever a property is changed

    Declaration
    public event PropertyChangedEventHandler? PropertyChanged
    Event Type
    Type Description
    PropertyChangedEventHandler
    | Edit this page View Source

    SingleTap

    SingleTap is called, when user clicks with a mouse button or tap with a finger on map

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

    TouchAction

    TouchAction is called, when user provoques a touch event

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

    TouchEnded

    TouchEnd is called, when user release a mouse button or doesn't touch display anymore

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

    TouchEntered

    TouchEntered is called, when user moves an active touch onto the view

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

    TouchExited

    TouchExited is called, when user moves an active touch off the view

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

    TouchMove

    TouchMove is called, when user move mouse over map (independent from mouse button state) or move finger on display

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

    TouchStarted

    Event handlers

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

    Zoomed

    Zoom is called, when map should be zoomed

    Declaration
    public event EventHandler<ZoomedEventArgs>? Zoomed
    Event Type
    Type Description
    EventHandler<ZoomedEventArgs>

    Implements

    IAnimatable
    ITabStopElement
    IViewController
    IVisualElementController
    IElementController
    IGestureController
    IGestureRecognizers
    ILayout
    ILayoutController
    IMapControl
    IDisposable
    INotifyPropertyChanged
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX