---
title: "MTStyleSprite | Mobile sdk | Mobile sdk ios | Ios"
description: "Represents a sprite defined in a map style."
---

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

# MTStyleSprite

```
public struct MTStyleSprite : Decodable, Equatable
```

Represents a sprite defined in a map style.

-   `[id](#/s:11MapTilerSDK13MTStyleSpriteV2idSSvp)`
    
    The identifier of the sprite. Default is “default” for string-based sprites.
    
    #### Declaration
    
    Swift
    
    ```
    public let id: String
    ```
    
-   `[url](#/s:11MapTilerSDK13MTStyleSpriteV3url10Foundation3URLVvp)`
    
    The URL of the sprite.
    
    #### Declaration
    
    Swift
    
    ```
    public let url: URL
    ```
    
-   `[init(id:url:)](#/s:11MapTilerSDK13MTStyleSpriteV2id3urlACSS_10Foundation3URLVtcfc)`
    
    Undocumented
    
    #### Declaration
    
    Swift
    
    ```
    public init(id: String = "default", url: URL)
    ```
    
-   `[init(from:)](#/s:Se4fromxs7Decoder_p_tKcfc)`
    
    #### Declaration
    
    Swift
    
    ```
    public init(from decoder: Decoder) throws
    ```
