Show / Hide Table of Contents

    Class MapControl

    Inheritance
    System.Object
    MapControl
    Implements
    IMapControl
    Grid
    Namespace: Mapsui.UI.Wpf
    Assembly: Mapsui.UI.Wpf.dll
    Syntax
    public class MapControl : INotifyPropertyChanged, IMapControl, Grid

    Constructors

    | Improve this Doc View Source

    MapControl()

    Declaration
    public MapControl()

    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

    MouseWheelAnimation

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

    RenderMode

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

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

    WpfCanvas

    Declaration
    public Canvas WpfCanvas { get; }
    Property Value
    Type Description
    Canvas

    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

    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
    IEnumerable<ILayer> layers
    Returns
    Type Description
    System.Byte[]
    | Improve this Doc View Source

    OnPropertyChanged(String)

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

    OnRender(DrawingContext)

    Declaration
    protected override void OnRender(DrawingContext dc)
    Parameters
    Type Name Description
    DrawingContext dc
    | Improve this Doc View Source

    OpenBrowser(String)

    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()
    | Improve this Doc View Source

    ZoomToBox(Geometries.Point, Geometries.Point)

    Declaration
    public void ZoomToBox(Geometries.Point beginPoint, Geometries.Point endPoint)
    Parameters
    Type Name Description
    Geometries.Point beginPoint
    Geometries.Point endPoint

    Events

    | Improve this Doc View Source

    FeatureInfo

    Declaration
    public event EventHandler<FeatureInfoEventArgs> FeatureInfo
    Event Type
    Type Description
    EventHandler<FeatureInfoEventArgs>
    | 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
    EventHandler<SwipedEventArgs>
    | 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
    EventHandler<MapInfoEventArgs>
    | Improve this Doc View Source

    PropertyChanged

    Called whenever a property is changed

    Declaration
    public event PropertyChangedEventHandler PropertyChanged
    Event Type
    Type Description
    PropertyChangedEventHandler
    | Improve this Doc View Source

    ViewportInitialized

    Called when the viewport is initialized

    Declaration
    public event EventHandler ViewportInitialized
    Event Type
    Type Description
    EventHandler

    Implements

    IMapControl
    Grid
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX