---
title: "MTLightAnchor | Mobile sdk | Mobile sdk ios | Ios"
description: "Sets whether extruded geometries are lit relative to the 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.

# MTLightAnchor

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

Sets whether extruded geometries are lit relative to the map or viewport.

-   `[map](#/s:11MapTilerSDK13MTLightAnchorO3mapyA2CmF)`
    
    The position of the light source is aligned to the rotation of the map.
    
    #### Declaration
    
    Swift
    
    ```
    case map
    ```
    
-   `[viewport](#/s:11MapTilerSDK13MTLightAnchorO8viewportyA2CmF)`
    
    The position of the light source is aligned to the rotation of the viewport.
    
    #### Declaration
    
    Swift
    
    ```
    case viewport
    ```
