---
title: "MTRendering | Mobile sdk | Mobile sdk ios | Ios"
description: "Defines methods for adjusting rendering parameters."
---

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

# MTRendering

```
@MainActor
public protocol MTRendering
```

Defines methods for adjusting rendering parameters.

-   `[getPixelRatio()](#/s:11MapTilerSDK11MTRenderingP13getPixelRatioSdyYaF)` Asynchronous
    
    Returns the pixel ratio currently used by the map.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func getPixelRatio() async -> Double
    ```
    
-   `[setPixelRatio(_:)](#/s:11MapTilerSDK11MTRenderingP13setPixelRatioyySdYaF)` Asynchronous
    
    Sets the pixel ratio to use when rendering the map.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func setPixelRatio(_ pixelRatio: Double) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>pixelRatio</em></code></td><td><div><p>Pixel ratio value to apply.</p></div></td></tr></tbody></table>
    
-   `[triggerRepaint()](#/s:11MapTilerSDK11MTRenderingP14triggerRepaintyyYaF)` Asynchronous
    
    Trigger the rendering of a single frame. Use this method with custom layers to repaint the map when the layer changes. Calling this multiple times before the next frame is rendered will still result in only a single frame being rendered.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func triggerRepaint() async
    ```
    
-   `[repaint()](#/s:11MapTilerSDK11MTRenderingP7repaintyyYaF)` Asynchronous
    
    Requests the map be repainted on the next animation frame.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func repaint() async
    ```
    
-   `[redraw()](#/s:11MapTilerSDK11MTRenderingP6redrawyyYaF)` Asynchronous
    
    Schedules a re‑render of the map.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func redraw() async
    ```
    
-   `[setShowTileBoundaries(_:)](#/s:11MapTilerSDK11MTRenderingP21setShowTileBoundariesyySbYaF)` Asynchronous
    
    Displays tile boundaries on the map.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func setShowTileBoundaries(_ show: Bool) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>show</em></code></td><td><div><p>A boolean value indicating whether to show tile boundaries.</p></div></td></tr></tbody></table>
    
-   `[setShowPadding(_:)](#/s:11MapTilerSDK11MTRenderingP14setShowPaddingyySbYaF)` Asynchronous
    
    Displays padding on the map.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func setShowPadding(_ show: Bool) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>show</em></code></td><td><div><p>A boolean value indicating whether to show padding.</p></div></td></tr></tbody></table>
    
-   `[setShowOverdrawInspector(_:)](#/s:11MapTilerSDK11MTRenderingP24setShowOverdrawInspectoryySbYaF)` Asynchronous
    
    Displays the overdraw inspector on the map.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func setShowOverdrawInspector(_ show: Bool) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>show</em></code></td><td><div><p>A boolean value indicating whether to show the overdraw inspector.</p></div></td></tr></tbody></table>
    
-   `[setShowCollisionBoxes(_:)](#/s:11MapTilerSDK11MTRenderingP21setShowCollisionBoxesyySbYaF)` Asynchronous
    
    Displays collision boxes on the map.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func setShowCollisionBoxes(_ show: Bool) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>show</em></code></td><td><div><p>A boolean value indicating whether to show collision boxes.</p></div></td></tr></tbody></table>
    
-   `[setMaxParallelImageRequests(_:)](#/s:11MapTilerSDK11MTRenderingP27setMaxParallelImageRequestsyySiYaF)` Asynchronous
    
    Sets the maximum number of images loaded in parallel.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func setMaxParallelImageRequests(_ maxParallelImageRequests: Int) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>maxParallelImageRequests</em></code></td><td><div><p>The maximum number of images.</p></div></td></tr></tbody></table>
    
-   `[setRTLTextPlugin(pluginURL:deferred:)](#/s:11MapTilerSDK11MTRenderingP16setRTLTextPlugin9pluginURL8deferredySS_SbtYaF)` Asynchronous
    
    Sets the map’s RTL text plugin.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    func setRTLTextPlugin(pluginURL: String, deferred: Bool) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>pluginURL</em></code></td><td><div><p>URL pointing to the Mapbox RTL text plugin source.</p></div></td></tr><tr><td><code><em>deferred</em></code></td><td><div><p>A boolean indicating if the plugin evaluation should be deferred.</p></div></td></tr></tbody></table>
