Search Results for

    Show / Hide Table of Contents

    Class Navigator

    Inheritance
    object
    Navigator
    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 Navigator

    Constructors

    | Edit this page View Source

    Navigator()

    Declaration
    public Navigator()

    Properties

    | Edit this page View Source

    HasExecutedPostponedCalls

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

    Limiter

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

    MouseWheelAnimation

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

    OverridePanBounds

    Overrides the default pan bounds which come from the Map extent.

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

    OverrideResolutions

    Overrides the default resolutions which are derived from the Map.Layers resolutions.

    Declaration
    public IReadOnlyList<double>? OverrideResolutions { get; set; }
    Property Value
    Type Description
    IReadOnlyList<double>
    | Edit this page View Source

    OverrideZoomBounds

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

    PanBounds

    The bounds to restrict panning. Exactly how these bounds affects panning depends on the implementation of the IViewportLimiter.

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

    PanLock

    When true the user can not pan (move) the map.

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

    ReSnapRotation

    With how many degrees from 0 should map snap to 0 degrees

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

    Resolutions

    List of resolutions that can be used when going to a new zoom level. In the most common case these resolutions correspond to the resolutions of the background layer of the map. In the Mapsui samples this is usually the openstreetmap layer, but there are also situations where this is no background layer with resolutions. Or where one app switches between different background layers with different resolutions. Also note that when pinch zooming these resolutions are not used.

    Declaration
    public IReadOnlyList<double> Resolutions { get; }
    Property Value
    Type Description
    IReadOnlyList<double>
    | Edit this page View Source

    RotationLock

    When true the user can not rotate the map

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

    UnSnapRotation

    Overrides the default zoom bounds which are derived from the Map resolutions.

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

    Viewport

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

    ZoomBounds

    The bounds of zooming, i.e. the smallest and biggest resolutions. How these bounds affect zooming depends on the implementation of the IViewportLimiter.

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

    ZoomLock

    When true the user can not zoom the map

    Declaration
    public bool ZoomLock { get; set; }
    Property Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    CenterOn(MPoint, long, Easing?)

    Change center of the viewport

    Declaration
    public void CenterOn(MPoint center, long duration = -1, Easing? easing = null)
    Parameters
    Type Name Description
    MPoint center

    New center point of the viewport

    long duration

    Duration for animation in milliseconds.

    Easing easing

    Function for easing

    | Edit this page View Source

    CenterOn(double, double, long, Easing?)

    Change center of the viewport to X/Y coordinates

    Declaration
    public void CenterOn(double x, double y, long duration = -1, Easing? easing = null)
    Parameters
    Type Name Description
    double x

    X value of the new center

    double y

    Y value of the new center

    long duration

    Duration for animation in milliseconds.

    Easing easing

    Function for easing

    | Edit this page View Source

    CenterOnAndZoomTo(MPoint, double, long, Easing?)

    Navigate to center and change resolution with animation

    Declaration
    public void CenterOnAndZoomTo(MPoint center, double resolution, long duration = -1, Easing? easing = null)
    Parameters
    Type Name Description
    MPoint center

    New center to move to

    double resolution

    New resolution to use

    long duration

    Duration for animation in milliseconds.

    Easing easing

    The type of easing function used to transform from begin tot end state

    | Edit this page View Source

    Fling(double, double, long)

    Animate Fling of the viewport. This method is called from the MapControl and is usually not called from user code. This method does not call Navigated.

    Declaration
    public void Fling(double velocityX, double velocityY, long maxDuration)
    Parameters
    Type Name Description
    double velocityX

    VelocityX from SwipedEventArgs>

    double velocityY

    VelocityX from SwipedEventArgs>

    long maxDuration

    Maximum duration of fling deceleration>

    | Edit this page View Source

    FlyTo(MPoint, double, long)

    Fly to the given center with zooming out to given resolution and in again

    Declaration
    public void FlyTo(MPoint center, double maxResolution, long duration = 500)
    Parameters
    Type Name Description
    MPoint center

    MPoint to fly to

    double maxResolution

    Maximum resolution to zoom out

    long duration

    Duration for animation in milliseconds.

    | Edit this page View Source

    Manipulate(Manipulation?)

    Declaration
    public void Manipulate(Manipulation? manipulation)
    Parameters
    Type Name Description
    Manipulation manipulation
    | Edit this page View Source

    MouseWheelZoom(int, ScreenPosition)

    Declaration
    public void MouseWheelZoom(int mouseWheelDelta, ScreenPosition centerOfZoom)
    Parameters
    Type Name Description
    int mouseWheelDelta
    ScreenPosition centerOfZoom
    | Edit this page View Source

    MouseWheelZoomContinuous(double, ScreenPosition)

    Declaration
    public void MouseWheelZoomContinuous(double scaleFactor, ScreenPosition centerOfZoom)
    Parameters
    Type Name Description
    double scaleFactor
    ScreenPosition centerOfZoom
    | Edit this page View Source

    RotateTo(double, long, Easing?)

    Change rotation of the viewport

    Declaration
    public void RotateTo(double rotation, long duration = -1, Easing? easing = null)
    Parameters
    Type Name Description
    double rotation

    New rotation in degrees of the viewport>

    long duration

    Duration for animation in milliseconds.

    Easing easing

    The type of easing function used to transform from begin tot end state

    | Edit this page View Source

    SetSize(double, double)

    Declaration
    public void SetSize(double width, double height)
    Parameters
    Type Name Description
    double width
    double height
    | Edit this page View Source

    SetViewport(Viewport, long, Easing?)

    Declaration
    public void SetViewport(Viewport viewport, long duration = -1, Easing? easing = null)
    Parameters
    Type Name Description
    Viewport viewport
    long duration
    Easing easing
    | Edit this page View Source

    SetViewportAnimations(List<AnimationEntry<Viewport>>)

    Declaration
    public void SetViewportAnimations(List<AnimationEntry<Viewport>> animations)
    Parameters
    Type Name Description
    List<AnimationEntry<Viewport>> animations
    | Edit this page View Source

    UpdateAnimations()

    Declaration
    public bool UpdateAnimations()
    Returns
    Type Description
    bool
    | Edit this page View Source

    ZoomIn(ScreenPosition, long, Easing?)

    Zoom in to a given point

    Declaration
    public void ZoomIn(ScreenPosition centerOfZoom, long duration = -1, Easing? easing = null)
    Parameters
    Type Name Description
    ScreenPosition centerOfZoom

    Center of zoom. This is the one point in the map that stays on the same location while zooming in.For instance, in mouse wheel zoom animation the position of the mouse pointer can be the center of zoom.

    long duration

    Duration for animation in milliseconds.

    Easing easing

    The type of easing function used to transform from begin tot end state

    | Edit this page View Source

    ZoomIn(long, Easing?)

    Zoom in to the next resolution in the Navigator.Resolutions list. Respects ZoomLock.

    Declaration
    public void ZoomIn(long duration = -1, Easing? easing = null)
    Parameters
    Type Name Description
    long duration

    Duration for animation in milliseconds.

    Easing easing

    The type of easing function used to transform from begin tot end state

    | Edit this page View Source

    ZoomOut(ScreenPosition, long, Easing?)

    Zoom out to a given point

    Declaration
    public void ZoomOut(ScreenPosition centerOfZoom, long duration = -1, Easing? easing = null)
    Parameters
    Type Name Description
    ScreenPosition centerOfZoom

    Center of zoom. This is the one point in the map that stays on the same location while zooming in. For instance, in mouse wheel zoom animation the position of the mouse pointer can be the center of zoom.

    long duration

    Duration for animation in milliseconds.

    Easing easing

    The type of easing function used to transform from begin tot end state

    | Edit this page View Source

    ZoomOut(long, Easing?)

    Zoom out to the next resolution in the Navigator.Resolutions list. Respects ZoomLock.

    Declaration
    public void ZoomOut(long duration = -1, Easing? easing = null)
    Parameters
    Type Name Description
    long duration

    Duration for animation in milliseconds.

    Easing easing

    The type of easing function used to transform from begin tot end state

    | Edit this page View Source

    ZoomTo(double, ScreenPosition, long, Easing?)

    Zoom to a given resolution with a given point as center

    Declaration
    public void ZoomTo(double resolution, ScreenPosition centerOfZoomScreen, long duration = -1, Easing? easing = null)
    Parameters
    Type Name Description
    double resolution

    Resolution to zoom

    ScreenPosition centerOfZoomScreen

    Center of zoom in screen coordinates. This is the one point in the map that stays on the same location while zooming in. For instance, in mouse wheel zoom animation the position of the mouse pointer can be the center of zoom. Note, that the centerOfZoom is in screen coordinates not world coordinates, this is because this is most convenient for the main use case, zoom with the mouse position as center.

    long duration

    Duration for animation in milliseconds.

    Easing easing

    The easing of the animation when duration is > 0

    | Edit this page View Source

    ZoomTo(double, long, Easing?)

    Change resolution of the viewport

    Declaration
    public void ZoomTo(double resolution, long duration = -1, Easing? easing = null)
    Parameters
    Type Name Description
    double resolution

    New resolution to use

    long duration

    Duration for animation in milliseconds.

    Easing easing

    The type of easing function used to transform from begin tot end state

    | Edit this page View Source

    ZoomToBox(MRect?, MBoxFit, long, Easing?)

    Zooms the viewport to show the box. The boxFit parameter can be used to deal with a difference in the width/height ratio between the viewport and the box. The center and resolution will change accordingly.

    Declaration
    public void ZoomToBox(MRect? box, MBoxFit boxFit = MBoxFit.Fit, long duration = -1, Easing? easing = null)
    Parameters
    Type Name Description
    MRect box

    The box to show in the viewport.

    MBoxFit boxFit

    The way the box should be fit into the view.

    long duration

    Duration for animation in milliseconds.

    Easing easing

    The type of easing function used to transform from begin tot end state

    | Edit this page View Source

    ZoomToLevel(int)

    Zooms to the level indicated. The level is the index of the resolution in the Navigator.Resolutions list.

    Declaration
    public void ZoomToLevel(int level)
    Parameters
    Type Name Description
    int level

    The index of the Navigator.Resolutions list.

    | Edit this page View Source

    ZoomToPanBounds(MBoxFit, long, Easing?)

    Navigate to the PanBounds.

    Declaration
    public void ZoomToPanBounds(MBoxFit boxFit = MBoxFit.Fill, long duration = -1, Easing? easing = null)
    Parameters
    Type Name Description
    MBoxFit boxFit

    Scale method to use to determine resolution

    long duration

    Duration for animation in milliseconds.

    Easing easing

    The type of easing function used to transform from begin tot end state

    Events

    | Edit this page View Source

    FetchRequested

    Called when a data refresh is needed. This directly after a non-animated viewport change is made and after an animation has completed.

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

    ViewportChanged

    Declaration
    public event Navigator.ViewportChangedEventHandler? ViewportChanged
    Event Type
    Type Description
    Navigator.ViewportChangedEventHandler

    Extension Methods

    DisposableExtension.DisposeIfDisposable(object?)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX