---
title: "MTNavigable | Mobile sdk | Mobile sdk ios | Ios"
description: "Defines methods for navigating the map."
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# MTNavigable

```
@MainActor
public protocol MTNavigable
```

Defines methods for navigating the map.

-   `[setBearing(_:)](#/s:11MapTilerSDK11MTNavigableP10setBearingyySdYaF)` Asynchronous
    
    Sets bearing of the map.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func setBearing(_ bearing: Double) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>bearing</em></code></td><td><div><p>The bearing of the map, measured in degrees counter-clockwise from north.</p></div></td></tr></tbody></table>
    
-   `[rotateTo(_:options:)](#/s:11MapTilerSDK11MTNavigableP8rotateTo_7optionsySd_AA18MTAnimationOptionsVSgtYaF)` Asynchronous
    
    Rotates the map to a given bearing with an optional animated transition.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func rotateTo(_ bearing: Double, options: MTAnimationOptions?) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>bearing</em></code></td><td><div><p>The desired bearing.</p></div></td></tr><tr><td><code><em>options</em></code></td><td><div><p>Animation options.</p></div></td></tr></tbody></table>
    
-   `[setCenter(_:)](#/s:11MapTilerSDK11MTNavigableP9setCenteryySo22CLLocationCoordinate2DVYaF)` Asynchronous
    
    Sets the geographical center of the map.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func setCenter(_ center: CLLocationCoordinate2D) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>center</em></code></td><td><div><p>Geographical center of the map.</p></div></td></tr></tbody></table>
    
-   `[flyTo(_:options:animationOptions:)](#/s:11MapTilerSDK11MTNavigableP5flyTo_7options16animationOptionsySo22CLLocationCoordinate2DV_AA05MTFlyfI0VSgAA011MTAnimationI0VSgtYaF)` Asynchronous
    
    Changes any combination of center, zoom, bearing, and pitch, animating the transition along a curve that evokes flight.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func flyTo(_ center: CLLocationCoordinate2D, options: MTFlyToOptions?, animationOptions: MTAnimationOptions?) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>center</em></code></td><td><div><p>Geographical center of the map.</p></div></td></tr><tr><td><code><em>options</em></code></td><td><div><p>FlyTo options.</p></div></td></tr><tr><td><code><em>animationOptions</em></code></td><td><div><p>animation options.</p></div></td></tr></tbody></table>
    
-   `[easeTo(_:options:animationOptions:)](#/s:11MapTilerSDK11MTNavigableP6easeTo_7options16animationOptionsySo22CLLocationCoordinate2DV_AA08MTCameraI0VSgAA011MTAnimationI0VSgtYaF)` Asynchronous
    
    Changes any combination of center, zoom, bearing and pitch with an animated transition between old and new values.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func easeTo(
        _ center: CLLocationCoordinate2D,
        options: MTCameraOptions?,
        animationOptions: MTAnimationOptions?
    ) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>center</em></code></td><td><div><p>Geographical center of the map.</p></div></td></tr><tr><td><code><em>options</em></code></td><td><div><p>Camera options.</p></div></td></tr><tr><td><code><em>animationOptions</em></code></td><td><div><p>animation options.</p></div></td></tr></tbody></table>
    
-   `[jumpTo(_:options:)](#/s:11MapTilerSDK11MTNavigableP6jumpTo_7optionsySo22CLLocationCoordinate2DV_AA15MTCameraOptionsVSgtYaF)` Asynchronous
    
    Changes any combination of center, zoom, bearing, and pitch, without an animated transition
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func jumpTo(_ center: CLLocationCoordinate2D, options: MTCameraOptions?) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>center</em></code></td><td><div><p>Geographical center of the map.</p></div></td></tr><tr><td><code><em>options</em></code></td><td><div><p>Camera options.</p></div></td></tr></tbody></table>
    
-   `[fitBounds(_:options:)](#/s:11MapTilerSDK11MTNavigableP9fitBounds_7optionsyAA8MTBoundsV_AA05MTFitF7OptionsVSgtYaF)` Asynchronous
    
    Fits the camera so that the provided bounds are fully visible within the viewport.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func fitBounds(_ bounds: MTBounds, options: MTFitBoundsOptions?) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>bounds</em></code></td><td><div><p>Geographic bounds to display.</p></div></td></tr><tr><td><code><em>options</em></code></td><td><div><p>Additional fit configuration.</p></div></td></tr></tbody></table>
    
-   `[fitScreenCoordinates(_:_:_:options:)](#/s:11MapTilerSDK11MTNavigableP20fitScreenCoordinates___7optionsyAA7MTPointV_AGSdAA18MTFitBoundsOptionsVSgtYaF)` Asynchronous
    
    Pans, rotates and zooms the map to to fit the box made by points p0 and p1 once the map is rotated to the specified bearing. To zoom without rotating, pass in the current map bearing.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func fitScreenCoordinates(_ p0: MTPoint, _ p1: MTPoint, _ bearing: Double, options: MTFitBoundsOptions?) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>p0</em></code></td><td><div><p>First point on screen.</p></div></td></tr><tr><td><code><em>p1</em></code></td><td><div><p>Second point on screen.</p></div></td></tr><tr><td><code><em>bearing</em></code></td><td><div><p>Desired map bearing at end of animation.</p></div></td></tr><tr><td><code><em>options</em></code></td><td><div><p>Additional fit configuration.</p></div></td></tr></tbody></table>
    
-   `[panBy(_:)](#/s:11MapTilerSDK11MTNavigableP5panByyyAA7MTPointVYaF)` Asynchronous
    
    Pans the map by the specified offset.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func panBy(_ offset: MTPoint) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>offset</em></code></td><td><div><p>Offset to pan by.</p></div></td></tr></tbody></table>
    
-   `[panTo(_:)](#/s:11MapTilerSDK11MTNavigableP5panToyySo22CLLocationCoordinate2DVYaF)` Asynchronous
    
    Pans the map to the specified location with an animated transition.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func panTo(_ coordinates: CLLocationCoordinate2D) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>coordinates</em></code></td><td><div><p>Coordinates to pan to.</p></div></td></tr></tbody></table>
    
-   `[stop()](#/s:11MapTilerSDK11MTNavigableP4stopyyYaF)` Asynchronous
    
    Stops any ongoing animated transition.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func stop() async
    ```
    
-   `[snapToNorth(animationOptions:)](#/s:11MapTilerSDK11MTNavigableP11snapToNorth16animationOptionsyAA011MTAnimationI0VSg_tYaF)` Asynchronous
    
    Snaps the map so that north is up.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func snapToNorth(animationOptions: MTAnimationOptions?) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>animationOptions</em></code></td><td><div><p>Animation options.</p></div></td></tr></tbody></table>
    
-   `[resetNorth(animationOptions:)](#/s:11MapTilerSDK11MTNavigableP10resetNorth16animationOptionsyAA011MTAnimationH0VSg_tYaF)` Asynchronous
    
    Resets the map bearing to 0 degrees.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func resetNorth(animationOptions: MTAnimationOptions?) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>animationOptions</em></code></td><td><div><p>Animation options.</p></div></td></tr></tbody></table>
    
-   `[resetNorthPitch(animationOptions:)](#/s:11MapTilerSDK11MTNavigableP15resetNorthPitch16animationOptionsyAA011MTAnimationI0VSg_tYaF)` Asynchronous
    
    Resets the map bearing to 0 and pitch to default.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func resetNorthPitch(animationOptions: MTAnimationOptions?) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>animationOptions</em></code></td><td><div><p>Animation options.</p></div></td></tr></tbody></table>
    
-   `[setPadding(_:)](#/s:11MapTilerSDK11MTNavigableP10setPaddingyyAA16MTPaddingOptionsVYaF)` Asynchronous
    
    Sets the padding in pixels around the viewport.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func setPadding(_ options: MTPaddingOptions) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>options</em></code></td><td><div><p>Padding options.</p></div></td></tr></tbody></table>
    
-   `[getPadding()](#/s:11MapTilerSDK11MTNavigableP10getPaddingAA16MTPaddingOptionsVyYaKF)` Asynchronous
    
    Returns the current viewport padding as MTPaddingOptions.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func getPadding() async throws -> MTPaddingOptions
    ```
    
-   `[fitToIpBounds()](#/s:11MapTilerSDK11MTNavigableP13fitToIpBoundsyyYaF)` Asynchronous
    
    Fits the map to the country-level bounds inferred from the current IP address.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func fitToIpBounds() async
    ```
    
-   `[setIsCenterClampedToGround(_:)](#/s:11MapTilerSDK11MTNavigableP26setIsCenterClampedToGroundyySbYaF)` Asynchronous
    
    Sets the center clamped to the ground.
    
    If true, the elevation of the center point will automatically be set to the terrain elevation (or zero if terrain is not enabled). If false, the elevation of the center point will default to sea level and will not automatically update.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func setIsCenterClampedToGround(_ isCenterClampedToGround: Bool) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>isCenterClampedToGround</em></code></td><td><div><p>Boolean indicating whether center is clamped to the ground.</p></div></td></tr></tbody></table>
    
-   `[setCenterElevation(_:)](#/s:11MapTilerSDK11MTNavigableP18setCenterElevationyySdYaF)` Asynchronous
    
    Sets the elevation of the map’s center point, in meters above sea level.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func setCenterElevation(_ elevation: Double) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>elevation</em></code></td><td><div><p>Desired elevation.</p></div></td></tr></tbody></table>
    
-   `[setMaxPitch(_:)](#/s:11MapTilerSDK11MTNavigableP11setMaxPitchyySdSgYaKF)` Asynchronous
    
    Sets the map’s maximum pitch.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func setMaxPitch(_ maxPitch: Double?) async throws
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>maxPitch</em></code></td><td><div><p>Desired pitch.</p></div></td></tr></tbody></table>
    
-   `[setMaxZoom(_:)](#/s:11MapTilerSDK11MTNavigableP10setMaxZoomyySdSgYaKF)` Asynchronous
    
    Sets the map’s maximum zoom.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func setMaxZoom(_ maxZoom: Double?) async throws
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>maxZoom</em></code></td><td><div><p>Desired zoom.</p></div></td></tr></tbody></table>
    
-   `[setMinPitch(_:)](#/s:11MapTilerSDK11MTNavigableP11setMinPitchyySdSgYaKF)` Asynchronous
    
    Sets the map’s minimum pitch.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func setMinPitch(_ minPitch: Double?) async throws
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>minPitch</em></code></td><td><div><p>Desired pitch.</p></div></td></tr></tbody></table>
    
-   `[setPitchLimits(with:)](#/s:11MapTilerSDK11MTNavigableP14setPitchLimits4withyAA18MTPitchLimitHelperC_tYaKF)` Asynchronous
    
    Sets the pitch limits.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func setPitchLimits(with pitchLimitHelper: MTPitchLimitHelper) async throws
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>pitchLimitHelper</em></code></td><td><div><p>Helper to use for setting the limits.</p></div></td></tr></tbody></table>
    
-   `[setMinZoom(_:)](#/s:11MapTilerSDK11MTNavigableP10setMinZoomyySdSgYaKF)` Asynchronous
    
    Sets the map’s minimum zoom.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func setMinZoom(_ minZoom: Double?) async throws
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>minZoom</em></code></td><td><div><p>Desired zoom.</p></div></td></tr></tbody></table>
    
-   `[setMaxBounds(_:)](#/s:11MapTilerSDK11MTNavigableP12setMaxBoundsyyAA8MTBoundsVSgYaKF)` Asynchronous
    
    Sets or clears the maximum bounds constraint applied to the map.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func setMaxBounds(_ bounds: MTBounds?) async throws
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>bounds</em></code></td><td><div><p>Geographic bounds to restrict panning, or <code>nil</code> to remove the constraint.</p></div></td></tr></tbody></table>
    
-   `[setPitch(_:)](#/s:11MapTilerSDK11MTNavigableP8setPitchyySdYaF)` Asynchronous
    
    Sets the map’s pitch.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func setPitch(_ pitch: Double) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>pitch</em></code></td><td><div><p>The pitch to set, measured in degrees away from the plane of the screen (0-60).</p></div></td></tr></tbody></table>
    
-   `[setRoll(_:)](#/s:11MapTilerSDK11MTNavigableP7setRollyySdYaF)` Asynchronous
    
    Sets the map’s roll angle.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func setRoll(_ roll: Double) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>roll</em></code></td><td><div><p>Desired roll.</p></div></td></tr></tbody></table>
    
-   `[getPitch()](#/s:11MapTilerSDK11MTNavigableP8getPitchSdyYaF)` Asynchronous
    
    Returns the map’s current pitch.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func getPitch() async -> Double
    ```
    
-   `[getMaxPitch()](#/s:11MapTilerSDK11MTNavigableP11getMaxPitchSdyYaF)` Asynchronous
    
    Returns the map’s maximum pitch.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func getMaxPitch() async -> Double
    ```
    
-   `[getMaxZoom()](#/s:11MapTilerSDK11MTNavigableP10getMaxZoomSdyYaF)` Asynchronous
    
    Returns the map’s maximum zoom.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func getMaxZoom() async -> Double
    ```
    
-   `[getMinPitch()](#/s:11MapTilerSDK11MTNavigableP11getMinPitchSdyYaF)` Asynchronous
    
    Returns the map’s minimum pitch.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func getMinPitch() async -> Double
    ```
    
-   `[getMinZoom()](#/s:11MapTilerSDK11MTNavigableP10getMinZoomSdyYaF)` Asynchronous
    
    Returns the map’s minimum zoom.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func getMinZoom() async -> Double
    ```
    
-   `[getCenter()](#/s:11MapTilerSDK11MTNavigableP9getCenterSo22CLLocationCoordinate2DVyYaF)` Asynchronous
    
    Returns the map’s current center.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func getCenter() async -> CLLocationCoordinate2D
    ```
    
-   `[getBounds()](#/s:11MapTilerSDK11MTNavigableP9getBoundsAA8MTBoundsVyYaF)` Asynchronous
    
    Returns the current viewport bounds.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func getBounds() async -> MTBounds
    ```
    
-   `[getMaxBounds()](#/s:11MapTilerSDK11MTNavigableP12getMaxBoundsAA8MTBoundsVSgyYaF)` Asynchronous
    
    Returns the maximum allowed bounds constraint if one is set.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func getMaxBounds() async -> MTBounds?
    ```
    
-   `[getCenterClampedToGround()](#/s:11MapTilerSDK11MTNavigableP24getCenterClampedToGroundSbyYaF)` Asynchronous
    
    Returns the state of the center clamped to ground flag.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func getCenterClampedToGround() async -> Bool
    ```
    
-   `[getCenterElevation()](#/s:11MapTilerSDK11MTNavigableP18getCenterElevationSdyYaF)` Asynchronous
    
    Returns the elevation of the map’s center point in meters above sea level.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func getCenterElevation() async -> Double
    ```
    
-   `[getCameraTargetElevation()](#/s:11MapTilerSDK11MTNavigableP24getCameraTargetElevationSdyYaF)` Asynchronous
    
    Returns the elevation for the point where the camera is looking, in meters above sea level multiplied by exaggeration.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func getCameraTargetElevation() async -> Double
    ```
    
-   `[getBearing()](#/s:11MapTilerSDK11MTNavigableP10getBearingSdyYaF)` Asynchronous
    
    Returns the map’s current bearing.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func getBearing() async -> Double
    ```
    
-   `[getRoll()](#/s:11MapTilerSDK11MTNavigableP7getRollSdyYaF)` Asynchronous
    
    Returns the map’s current roll.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func getRoll() async -> Double
    ```
    
-   `[isMoving()](#/s:11MapTilerSDK11MTNavigableP8isMovingSbyYaF)` Asynchronous
    
    Returns true while any camera movement is active.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func isMoving() async -> Bool
    ```
    
-   `[isRotating()](#/s:11MapTilerSDK11MTNavigableP10isRotatingSbyYaF)` Asynchronous
    
    Returns true while the map is rotating.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func isRotating() async -> Bool
    ```
    
-   `[isZooming()](#/s:11MapTilerSDK11MTNavigableP9isZoomingSbyYaF)` Asynchronous
    
    Returns true while the map is zooming.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func isZooming() async -> Bool
    ```
