---
title: "MTMarkerRotationAlignment | Mobile sdk | Mobile sdk ios | Ios"
description: "Alignment for marker rotation relative to map or viewport."
---

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

# MTMarkerRotationAlignment

```
public enum MTMarkerRotationAlignment : String, Sendable, Codable
```

Alignment for marker rotation relative to map or viewport.

-   `[map](#/s:11MapTilerSDK25MTMarkerRotationAlignmentO3mapyA2CmF)`
    
    Aligns the marker’s rotation with the map, reacting to map bearing.
    
    #### Declaration
    
    Swift
    
    ```
    case map
    ```
    
-   `[viewport](#/s:11MapTilerSDK25MTMarkerRotationAlignmentO8viewportyA2CmF)`
    
    Aligns the marker’s rotation with the viewport, ignoring map bearing.
    
    #### Declaration
    
    Swift
    
    ```
    case viewport
    ```
    
-   `[auto](#/s:11MapTilerSDK25MTMarkerRotationAlignmentO4autoyA2CmF)`
    
    Alias for `[.viewport](https://docs.maptiler.com/mobile-sdk/ios/api/Enums/MTMarkerRotationAlignment/#/s:11MapTilerSDK25MTMarkerRotationAlignmentO8viewportyA2CmF)`.
    
    #### Declaration
    
    Swift
    
    ```
    case auto
    ```
