Search Results for

    Show / Hide Table of Contents

    Class Map

    Map class

    Inheritance
    object
    Map
    Implements
    INotifyPropertyChanged
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Mapsui
    Assembly: Mapsui.dll
    Syntax
    public class Map : INotifyPropertyChanged, IDisposable
    Remarks

    Map holds all map related infos like the target CRS, layers, widgets and so on.

    Constructors

    | Edit this page View Source

    Map()

    Initializes a new map

    Declaration
    public Map()

    Properties

    | Edit this page View Source

    BackColor

    Map background color (defaults to transparent)

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

    CRS

    Coordinate reference system (projection type of map). Default: "EPSG:3857" (SphericalMercator).

    Declaration
    public string? CRS { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Extent

    Gets the extent of the map based on the extent of all the layers in the layers collection

    Declaration
    public MRect? Extent { get; }
    Property Value
    Type Description
    MRect

    Full map extent

    | Edit this page View Source

    Home

    Declaration
    public Action<Navigator> Home { get; set; }
    Property Value
    Type Description
    Action<Navigator>
    | Edit this page View Source

    HomeIsCalledOnce

    To register if the initial Home call has been done.

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

    Layers

    A collection of layers. The first layer in the list is drawn first, the last one on top.

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

    Navigator

    Handles all manipulations of the map viewport

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

    Widgets

    List of Widgets belonging to map

    Declaration
    public ConcurrentQueue<IWidget> Widgets { get; }
    Property Value
    Type Description
    ConcurrentQueue<IWidget>

    Methods

    | Edit this page View Source

    AbortFetch()

    Abort fetching of all layers

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

    ClearCache()

    Clear cache of all layers

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

    Dispose()

    Declaration
    public virtual void Dispose()
    | Edit this page View Source

    GetWidgetsOfMapAndLayers()

    Declaration
    public IEnumerable<IWidget> GetWidgetsOfMapAndLayers()
    Returns
    Type Description
    IEnumerable<IWidget>
    | Edit this page View Source

    OnInfo(MapInfoEventArgs?)

    This method is to invoke the Info event from the Map. This method is called by the MapControl/MapView and should usually not be called from user code.

    Declaration
    public void OnInfo(MapInfoEventArgs? mapInfoEventArgs)
    Parameters
    Type Name Description
    MapInfoEventArgs mapInfoEventArgs
    | Edit this page View Source

    OnViewportSizeInitialized()

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

    Refresh(ChangeType)

    Refresh data of the map and than repaint it

    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

    RefreshData(FetchInfo)

    Declaration
    public void RefreshData(FetchInfo fetchInfo)
    Parameters
    Type Name Description
    FetchInfo fetchInfo
    | Edit this page View Source

    RefreshGraphics()

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

    UpdateAnimations()

    Declaration
    public bool UpdateAnimations()
    Returns
    Type Description
    bool

    Events

    | Edit this page View Source

    DataChanged

    DataChanged should be triggered by any data changes of any of the child layers

    Declaration
    public event DataChangedEventHandler? DataChanged
    Event Type
    Type Description
    DataChangedEventHandler
    | 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 changed

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

    RefreshGraphicsRequest

    Declaration
    public event EventHandler? RefreshGraphicsRequest
    Event Type
    Type Description
    EventHandler
    | Edit this page View Source

    ViewportInitialized

    Called when the viewport is initialized

    Declaration
    public event EventHandler? ViewportInitialized
    Event Type
    Type Description
    EventHandler

    Implements

    INotifyPropertyChanged
    IDisposable
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX