---
title: "MTOfflineTileScheme | Mobile sdk | Mobile sdk ios | Ios"
description: "Defines the tile coordinate scheme used by the tile source."
---

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

# MTOfflineTileScheme

```
public enum MTOfflineTileScheme : String, Equatable
```

Defines the tile coordinate scheme used by the tile source.

-   `[xyz](#/s:11MapTilerSDK19MTOfflineTileSchemeO3xyzyA2CmF)`
    
    Slippy Map (standard Web Mercator) scheme, where Y=0 is at the top.
    
    #### Declaration
    
    Swift
    
    ```
    case xyz
    ```
    
-   `[tms](#/s:11MapTilerSDK19MTOfflineTileSchemeO3tmsyA2CmF)`
    
    OSGeo Tile Map Service scheme, where Y=0 is at the bottom.
    
    #### Declaration
    
    Swift
    
    ```
    case tms
    ```
    
-   `[inferred(from:)](#/s:11MapTilerSDK19MTOfflineTileSchemeO8inferred4fromACSS_tFZ)`
    
    Attempts to infer the tile scheme based on common patterns in a tile URL template.
    
    Many tile providers and MapLibre standard styles use `{-y}` to indicate an inverted Y-axis (TMS), whereas `{y}` usually implies the standard XYZ scheme.
    
    #### Declaration
    
    Swift
    
    ```
    public static func inferred(from urlTemplate: String) -> MTOfflineTileScheme
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>urlTemplate</em></code></td><td><div><p>A URL template containing coordinate variables.</p></div></td></tr></tbody></table>
    
    #### Return Value
    
    `[.tms](https://docs.maptiler.com/mobile-sdk/ios/api/Enums/MTOfflineTileScheme/#/s:11MapTilerSDK19MTOfflineTileSchemeO3tmsyA2CmF)` if the template implies an inverted Y coordinate, otherwise `[.xyz](https://docs.maptiler.com/mobile-sdk/ios/api/Enums/MTOfflineTileScheme/#/s:11MapTilerSDK19MTOfflineTileSchemeO3xyzyA2CmF)`.
