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

    Properties

    | 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

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

    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

    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 zoom into the map

    Declaration
    public bool RotationLock { get; set; }
    Property Value
    Type Description
    bool
    | 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 an not rotate 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

    Drag(MPoint, MPoint)

    To pan the map when dragging with mouse or single finger. This method is called from the MapControl and is usually not called from user code. This method does not call Navigated. So, Navigated needs to be called from the MapControl on mouse/touch up.

    Declaration
    public void Drag(MPoint positionScreen, MPoint previousPositionScreen)
    Parameters
    Type Name Description
    MPoint positionScreen

    Screen position of the dragging mouse or finger.

    MPoint previousPositionScreen

    Previous position of the dragging mouse or finger.

    | 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

    MouseWheelZoom(int, MPoint)

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

    MouseWheelZoomContinuous(double, MPoint)

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

    Pinch(MPoint, MPoint, double, double)

    To change the map viewport when using multiple fingers. This method is called from the MapControl and is usually not called from user code. This method does not call Navigated. So, Navigated needs to be called from the MapControl on mouse/touch up.

    Declaration
    public void Pinch(MPoint currentPinchCenter, MPoint previousPinchCenter, double deltaResolution, double deltaRotation = 0)
    Parameters
    Type Name Description
    MPoint currentPinchCenter

    The center of the current position of touch positions.

    MPoint previousPinchCenter

    The previous center of the current position of touch positions.

    double deltaResolution

    The change in resolution cause by moving the fingers together or further apart.

    double deltaRotation

    The change in rotation of the finger positions.

    | 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(MPoint, long, Easing?)

    Zoom in to a given point

    Declaration
    public void ZoomIn(MPoint centerOfZoom, long duration = -1, Easing? easing = null)
    Parameters
    Type Name Description
    MPoint 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 resolutionin in the Navigator.Resolutions list.

    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(MPoint, long, Easing?)

    Zoom out to a given point

    Declaration
    public void ZoomOut(MPoint centerOfZoom, long duration = -1, Easing? easing = null)
    Parameters
    Type Name Description
    MPoint 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.

    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, MPoint, long, Easing?)

    Zoom to a given resolution with a given point as center

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

    Resolution to zoom

    MPoint centerOfZoomInScreenCoordinates

    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

    RefreshDataRequest

    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? RefreshDataRequest
    Event Type
    Type Description
    EventHandler
    | Edit this page View Source

    ViewportChanged

    Declaration
    public event PropertyChangedEventHandler? ViewportChanged
    Event Type
    Type Description
    PropertyChangedEventHandler
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX