Search Results for

    Show / Hide Table of Contents

    Class MapControl

    Inheritance
    object
    ComponentBase
    MapControl
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IMapControl
    INotifyPropertyChanged
    IDisposable
    Inherited Members
    ComponentBase.BuildRenderTree(RenderTreeBuilder)
    ComponentBase.OnInitializedAsync()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.StateHasChanged()
    ComponentBase.ShouldRender()
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.SetParametersAsync(ParameterView)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Mapsui.UI.Blazor
    Assembly: Mapsui.UI.Blazor.dll
    Syntax
    public class MapControl : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IMapControl, INotifyPropertyChanged, IDisposable

    Fields

    | Edit this page View Source

    _elementId

    Declaration
    protected readonly string _elementId
    Field Value
    Type Description
    string
    | Edit this page View Source

    _viewCpu

    Declaration
    protected SKCanvasView? _viewCpu
    Field Value
    Type Description
    SKCanvasView
    | Edit this page View Source

    _viewGpu

    Declaration
    protected SKGLView? _viewGpu
    Field Value
    Type Description
    SKGLView

    Properties

    | Edit this page View Source

    ContinuousMouseWheelZoomStepSize

    The size of the mouse wheel steps used when UseContinuousMouseWheelZoom = true. The default is 0.1. A step size of 1 would doubling or halving the scale of the map on each event.

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

    Cursor

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

    ElementId

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

    Interop

    Declaration
    protected MapsuiJsInterop? Interop { get; }
    Property Value
    Type Description
    MapsuiJsInterop
    | Edit this page View Source

    Map

    Map holding data for which is shown in this MapControl

    Declaration
    [Parameter]
    public Map Map { get; set; }
    Property Value
    Type Description
    Map
    | Edit this page View Source

    MoveButton

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

    MoveCursor

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

    MoveModifier

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

    Renderer

    Renderer that is used from this MapControl

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

    ShiftPressed

    Declaration
    public bool ShiftPressed { get; }
    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
    | Edit this page View Source

    UseContinuousMouseWheelZoom

    This enables an alternative mouse wheel method where the step size on each mouse wheel event can be configured by setting the ContinuousMouseWheelZoomStepSize.

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

    UseGPU

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

    ViewportHeight

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

    ViewportWidth

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

    ZoomButton

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

    ZoomModifier

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

    Methods

    | Edit this page View Source

    CallHomeIfNeeded()

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

    ControlInitialize()

    Declaration
    protected void ControlInitialize()
    | Edit this page View Source

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    Declaration
    public virtual void Dispose()
    | 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

    OnDblClick(MouseEventArgs)

    Declaration
    protected void OnDblClick(MouseEventArgs e)
    Parameters
    Type Name Description
    MouseEventArgs e
    | Edit this page View Source

    OnInitialized()

    Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree.

    Declaration
    protected override void OnInitialized()
    Overrides
    ComponentBase.OnInitialized()
    | Edit this page View Source

    OnKeyDown(KeyboardEventArgs)

    Declaration
    protected void OnKeyDown(KeyboardEventArgs e)
    Parameters
    Type Name Description
    KeyboardEventArgs e
    | Edit this page View Source

    OnKeyUp(KeyboardEventArgs)

    Declaration
    protected void OnKeyUp(KeyboardEventArgs e)
    Parameters
    Type Name Description
    KeyboardEventArgs e
    | Edit this page View Source

    OnMouseMove(MouseEventArgs)

    Declaration
    protected void OnMouseMove(MouseEventArgs e)
    Parameters
    Type Name Description
    MouseEventArgs e
    | Edit this page View Source

    OnMouseOut(MouseEventArgs)

    Declaration
    protected void OnMouseOut(MouseEventArgs e)
    Parameters
    Type Name Description
    MouseEventArgs e
    | Edit this page View Source

    OnMouseWheel(WheelEventArgs)

    Declaration
    protected void OnMouseWheel(WheelEventArgs e)
    Parameters
    Type Name Description
    WheelEventArgs e
    | Edit this page View Source

    OnPaintSurface(SKCanvas, SKImageInfo)

    Declaration
    protected void OnPaintSurface(SKCanvas canvas, SKImageInfo info)
    Parameters
    Type Name Description
    SKCanvas canvas
    SKImageInfo info
    | Edit this page View Source

    OnPaintSurfaceCPU(SKPaintSurfaceEventArgs)

    Declaration
    protected void OnPaintSurfaceCPU(SKPaintSurfaceEventArgs e)
    Parameters
    Type Name Description
    SKPaintSurfaceEventArgs e
    | Edit this page View Source

    OnPaintSurfaceGPU(SKPaintGLSurfaceEventArgs)

    Declaration
    protected void OnPaintSurfaceGPU(SKPaintGLSurfaceEventArgs e)
    Parameters
    Type Name Description
    SKPaintGLSurfaceEventArgs e
    | Edit this page View Source

    OnPointerDown(PointerEventArgs)

    Declaration
    protected void OnPointerDown(PointerEventArgs e)
    Parameters
    Type Name Description
    PointerEventArgs e
    | Edit this page View Source

    OnPointerUp(PointerEventArgs)

    Declaration
    protected void OnPointerUp(PointerEventArgs e)
    Parameters
    Type Name Description
    PointerEventArgs e
    | Edit this page View Source

    OnPropertyChanged(string)

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

    OnTouchEnd(TouchEventArgs)

    Declaration
    public void OnTouchEnd(TouchEventArgs e)
    Parameters
    Type Name Description
    TouchEventArgs e
    | Edit this page View Source

    OnTouchMove(TouchEventArgs)

    Declaration
    public void OnTouchMove(TouchEventArgs e)
    Parameters
    Type Name Description
    TouchEventArgs e
    | Edit this page View Source

    OnTouchStart(TouchEventArgs)

    Declaration
    public void OnTouchStart(TouchEventArgs e)
    Parameters
    Type Name Description
    TouchEventArgs e
    | Edit this page View Source

    OpenBrowser(string)

    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

    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()
    | Edit this page View Source

    ZoomToBox(MPoint, MPoint)

    Declaration
    public void ZoomToBox(MPoint beginPoint, MPoint endPoint)
    Parameters
    Type Name Description
    MPoint beginPoint
    MPoint endPoint

    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>
    | Edit this page View Source

    PropertyChanged

    Called whenever a property is changed

    Declaration
    public event PropertyChangedEventHandler? PropertyChanged
    Event Type
    Type Description
    PropertyChangedEventHandler

    Implements

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