---
title: "MTMapCameraHelper | Mobile sdk | Mobile sdk ios | Ios"
description: "Sets combination of center, bearing and pitch, as well as roll and elevation."
---

> 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.

# MTMapCameraHelper

```
public class MTMapCameraHelper
```

Sets combination of center, bearing and pitch, as well as roll and elevation.

-   `[centerCoordinate](#/s:11MapTilerSDK17MTMapCameraHelperC16centerCoordinateSo22CLLocationCoordinate2DVSgvp)`
    
    The geographical centerpoint of the map.
    
    If center is not specified, SDK will look for it in the map style object. If it is not specified in the style, it will default to (latitude: 0.0, longitude: 0.0).
    
    #### Declaration
    
    Swift
    
    ```
    public var centerCoordinate: CLLocationCoordinate2D?
    ```
    
-   `[bearing](#/s:11MapTilerSDK17MTMapCameraHelperC7bearingSdSgvp)`
    
    The bearing of the map, measured in degrees counter-clockwise from north.
    
    If bearing is not specified, SDK will look for it in the map style object. If it is not specified in the style, it will default to 0.0.
    
    #### Declaration
    
    Swift
    
    ```
    public var bearing: Double?
    ```
    
-   `[pitch](#/s:11MapTilerSDK17MTMapCameraHelperC5pitchSdSgvp)`
    
    The pitch (tilt) of the map, measured in degrees away from the plane of the screen (0-85).
    
    If pitch is not specified, SDK will look for it in the map style object. If it is not specified in the style, it will default to 0.0.
    
    #### Declaration
    
    Swift
    
    ```
    public var pitch: Double?
    ```
    
-   `[roll](#/s:11MapTilerSDK17MTMapCameraHelperC4rollSdSgvp)`
    
    The roll angle of the map, measured in degrees counter-clockwise about the camera boresight.
    
    If roll is not specified, SDK will look for it in the map style object. If it is not specified in the style, it will default to 0.0.
    
    #### Declaration
    
    Swift
    
    ```
    public var roll: Double?
    ```
    
-   `[elevation](#/s:11MapTilerSDK17MTMapCameraHelperC9elevationSdSgvp)`
    
    The elevation of the geographical centerpoint of the map, in meters above sea level.
    
    If elevation is not specified, SDK will look for it in the map style object. If it is not specified in the style, it will default to 0.0.
    
    #### Declaration
    
    Swift
    
    ```
    public var elevation: Double?
    ```
    
-   `[getCamera()](#/s:11MapTilerSDK17MTMapCameraHelperC03getE0ACyFZ)`
    
    Returns camera object with all properties set to 0.
    
    #### Declaration
    
    Swift
    
    ```
    public static func getCamera() -> MTMapCameraHelper
    ```
    
-   `[getCameraFromMapStyle()](#/s:11MapTilerSDK17MTMapCameraHelperC03gete4FromA5StyleACyFZ)`
    
    Returns camera object initialized from map style options.
    
    If any of the properties is not set within the style, it will default to 0.
    
    #### Declaration
    
    Swift
    
    ```
    public static func getCameraFromMapStyle() -> MTMapCameraHelper
    ```
    
-   `[getCameraWith(_:)](#/s:11MapTilerSDK17MTMapCameraHelperC03getE4WithyAcA0D7OptionsVFZ)`
    
    Returns camera object constructed from given options object.
    
    #### Declaration
    
    Swift
    
    ```
    public static func getCameraWith(_ options: MTMapOptions) -> MTMapCameraHelper
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>options</em></code></td><td><div><p>MTMapOptions object with initial camera options.</p></div></td></tr></tbody></table>
    
-   `[cameraLookingAtCenterCoordinate(_:bearing:pitch:roll:elevation:)](#/s:11MapTilerSDK17MTMapCameraHelperC31cameraLookingAtCenterCoordinate_7bearing5pitch4roll9elevationACSo22CLLocationCoordinate2DV_S4dtFZ)`
    
    Returns camera object with the given center coordinate, bearing, pitch, roll and elevation.
    
    #### Declaration
    
    Swift
    
    ```
    public static func cameraLookingAtCenterCoordinate(
        _ centerCoordinate: CLLocationCoordinate2D,
        bearing: Double,
        pitch: Double,
        roll: Double,
        elevation: Double
    ) -> MTMapCameraHelper
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>centerCoordinate</em></code></td><td><div><p>Latitude and longitude pair.</p></div></td></tr><tr><td><code><em>bearing</em></code></td><td><div><p>Bearing of the map, measured in degrees counter-clockwise from north.</p></div></td></tr><tr><td><code><em>pitch</em></code></td><td><div><p>Pitch of the map, measured in degrees away from the plane of the screen (0-85).</p></div></td></tr><tr><td><code><em>roll</em></code></td><td><div><p>Roll angle of the map, measured in degrees counter-clockwise about the camera boresight.</p></div></td></tr><tr><td><code><em>elevation</em></code></td><td><div><p>Elevation of the initial geographical centerpoint of the map, in meters above sea level.</p></div></td></tr></tbody></table>
    
-   `[cameraLookingAtCenterCoordinate(_:bearing:pitch:)](#/s:11MapTilerSDK17MTMapCameraHelperC31cameraLookingAtCenterCoordinate_7bearing5pitchACSo22CLLocationCoordinate2DV_S2dtFZ)`
    
    Returns camera object with the given center coordinate, bearing and pitch.
    
    Looks for roll and elevation in the map’s style object. If they are not specified in the style, they will default to 0.
    
    #### Declaration
    
    Swift
    
    ```
    public static func cameraLookingAtCenterCoordinate(
        _ centerCoordinate: CLLocationCoordinate2D,
        bearing: Double,
        pitch: Double
    ) -> MTMapCameraHelper
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>centerCoordinate</em></code></td><td><div><p>Latitude and longitude pair.</p></div></td></tr><tr><td><code><em>bearing</em></code></td><td><div><p>Bearing of the map, measured in degrees counter-clockwise from north.</p></div></td></tr><tr><td><code><em>pitch</em></code></td><td><div><p>Pitch of the map, measured in degrees away from the plane of the screen (0-85).</p></div></td></tr></tbody></table>
    
-   `[isEqualToMapCameraHelper(_:)](#/s:11MapTilerSDK17MTMapCameraHelperC09isEqualToaeF0ySbACF)`
    
    Returns a Boolean indicating whether the camera object is equal to the receiver.
    
    #### Declaration
    
    Swift
    
    ```
    public func isEqualToMapCameraHelper(_ camera: MTMapCameraHelper) -> Bool
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>camera</em></code></td><td><div><p>MTMapCamera object to compare with.</p></div></td></tr></tbody></table>
