Show / Hide Table of Contents

    Class MapControl

    Class, that uses the API of all other Mapsui MapControls

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

    Constructors

    | Improve this Doc View Source

    MapControl()

    Declaration
    public MapControl()

    Fields

    | Improve this Doc View Source

    UseDoubleTap

    Declaration
    public bool UseDoubleTap
    Field Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    UseFling

    Declaration
    public bool UseFling
    Field Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    UseGPU

    Declaration
    public static bool UseGPU
    Field Value
    Type Description
    System.Boolean

    Properties

    | Improve this Doc View Source

    Map

    Map holding data for which is shown in this MapControl

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

    Navigator

    Handles all manipulations of the map viewport

    Declaration
    public INavigator Navigator { get; set; }
    Property Value
    Type Description
    INavigator
    | Improve this Doc 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.

    | Improve this Doc View Source

    PixelDensity

    Declaration
    public float PixelDensity { get; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    Renderer

    Renderer that is used from this MapControl

    Declaration
    public IRenderer Renderer { get; set; }
    Property Value
    Type Description
    IRenderer
    | Improve this Doc 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
    System.Double
    | Improve this Doc View Source

    ScreenHeight

    Declaration
    public float ScreenHeight { get; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    ScreenWidth

    Declaration
    public float ScreenWidth { get; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    SymbolCache

    Declaration
    public ISymbolCache SymbolCache { get; }
    Property Value
    Type Description
    ISymbolCache
    | Improve this Doc View Source

    UnSnapRotationDegrees

    After how many degrees start rotation to take place

    Declaration
    public double UnSnapRotationDegrees { get; set; }
    Property Value
    Type Description
    System.Double
    | Improve this Doc View Source

    UpdateInterval

    Interval between two redraws of the MapControl in ms

    Declaration
    public int UpdateInterval { get; set; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    Viewport

    Viewport holding information about visible part of the map. Viewport can never be null.

    Declaration
    public IReadOnlyViewport Viewport { get; }
    Property Value
    Type Description
    IReadOnlyViewport

    Methods

    | Improve this Doc View Source

    CallHomeIfNeeded()

    Declaration
    public void CallHomeIfNeeded()
    | Improve this Doc View Source

    Clear()

    Clear cache and repaint map

    Declaration
    public void Clear()
    | Improve this Doc View Source

    Dispose()

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    Dispose(Boolean)

    Declaration
    protected void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    | Improve this Doc View Source

    ForceUpdate()

    Force a update of control

    Declaration
    public void ForceUpdate()
    Remarks

    When this function is called, the control draws itself once

    | Improve this Doc View Source

    GetMapInfo(Point, Int32)

    Declaration
    public MapInfo GetMapInfo(Point screenPosition, int margin = 0)
    Parameters
    Type Name Description
    Point screenPosition
    System.Int32 margin
    Returns
    Type Description
    MapInfo
    | Improve this Doc View Source

    GetSnapshot(IEnumerable<ILayer>)

    Declaration
    public byte[] GetSnapshot(IEnumerable<ILayer> layers = null)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<ILayer> layers
    Returns
    Type Description
    System.Byte[]
    | Improve this Doc View Source

    OnPropertyChanged(String)

    Declaration
    protected override void OnPropertyChanged(string propertyName = "")
    Parameters
    Type Name Description
    System.String propertyName
    Overrides
    Xamarin.Forms.Element.OnPropertyChanged(System.String)
    | Improve this Doc View Source

    OpenBrowser(String)

    Public functions

    Declaration
    public void OpenBrowser(string url)
    Parameters
    Type Name Description
    System.String url
    | Improve this Doc View Source

    Refresh(ChangeType)

    Refresh data of the map and than repaint it

    Declaration
    public void Refresh(ChangeType changeType = null)
    Parameters
    Type Name Description
    ChangeType changeType
    | Improve this Doc View Source

    RefreshData(ChangeType)

    Refresh data of Map, but don't paint it

    Declaration
    public void RefreshData(ChangeType changeType = null)
    Parameters
    Type Name Description
    ChangeType changeType
    | Improve this Doc View Source

    RefreshGraphics()

    Declaration
    public void RefreshGraphics()
    | Improve this Doc View Source

    StartUpdates(Boolean)

    Start updates for control

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

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

    | Improve this Doc 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

    | Improve this Doc View Source

    ToDeviceIndependentUnits(Point)

    Declaration
    public Point ToDeviceIndependentUnits(Point coordinateInPixels)
    Parameters
    Type Name Description
    Point coordinateInPixels
    Returns
    Type Description
    Point
    | Improve this Doc View Source

    ToPixels(Point)

    Declaration
    public Point ToPixels(Point coordinateInDeviceIndependentUnits)
    Parameters
    Type Name Description
    Point coordinateInDeviceIndependentUnits
    Returns
    Type Description
    Point
    | Improve this Doc View Source

    Unsubscribe()

    Unsubscribe from map events

    Declaration
    public void Unsubscribe()

    Events

    | Improve this Doc 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
    System.EventHandler<TappedEventArgs>
    | Improve this Doc View Source

    Fling

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

    Declaration
    public event EventHandler<SwipedEventArgs> Fling
    Event Type
    Type Description
    System.EventHandler<SwipedEventArgs>
    | Improve this Doc 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
    System.EventHandler<HoveredEventArgs>
    | Improve this Doc View Source

    Info

    Called whenever a feature in one of the layers in InfoLayers is hitten by a click

    Declaration
    public event EventHandler<MapInfoEventArgs> Info
    Event Type
    Type Description
    System.EventHandler<MapInfoEventArgs>
    | Improve this Doc 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
    System.EventHandler<TappedEventArgs>
    | Improve this Doc View Source

    PropertyChanged

    Called whenever a property is changed

    Declaration
    public event PropertyChangedEventHandler PropertyChanged
    Event Type
    Type Description
    System.ComponentModel.PropertyChangedEventHandler
    | Improve this Doc 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
    System.EventHandler<TappedEventArgs>
    | Improve this Doc View Source

    Swipe

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

    Declaration
    public event EventHandler<SwipedEventArgs> Swipe
    Event Type
    Type Description
    System.EventHandler<SwipedEventArgs>
    | Improve this Doc View Source

    TouchAction

    TouchAction is called, when user provoques a touch event

    Declaration
    public event EventHandler<SKTouchEventArgs> TouchAction
    Event Type
    Type Description
    System.EventHandler<SkiaSharp.Views.Forms.SKTouchEventArgs>
    | Improve this Doc 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
    System.EventHandler<TouchedEventArgs>
    | Improve this Doc 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
    System.EventHandler<TouchedEventArgs>
    | Improve this Doc 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
    System.EventHandler<TouchedEventArgs>
    | Improve this Doc 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
    System.EventHandler<TouchedEventArgs>
    | Improve this Doc View Source

    TouchStarted

    Event handlers

    Declaration
    public event EventHandler<TouchedEventArgs> TouchStarted
    Event Type
    Type Description
    System.EventHandler<TouchedEventArgs>
    | Improve this Doc View Source

    ViewportInitialized

    Called when the viewport is initialized

    Declaration
    public event EventHandler ViewportInitialized
    Event Type
    Type Description
    System.EventHandler
    | Improve this Doc View Source

    Zoomed

    Zoom is called, when map should be zoomed

    Declaration
    public event EventHandler<ZoomedEventArgs> Zoomed
    Event Type
    Type Description
    System.EventHandler<ZoomedEventArgs>

    Implements

    Xamarin.Forms.IAnimatable
    Xamarin.Forms.ITabStopElement
    Xamarin.Forms.IViewController
    Xamarin.Forms.IVisualElementController
    Xamarin.Forms.IElementController
    Xamarin.Forms.Internals.IGestureController
    Xamarin.Forms.IGestureRecognizers
    Xamarin.Forms.ILayout
    Xamarin.Forms.ILayoutController
    IMapControl
    System.IDisposable
    System.ComponentModel.INotifyPropertyChanged
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX