---
title: "MTDragPanOptions | Mobile sdk | Mobile sdk ios | Ios"
description: "Options for drag and pan gesstures."
---

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

# MTDragPanOptions

```
public struct MTDragPanOptions : Sendable, Codable
```

Options for drag and pan gesstures.

-   `[linearity](#/s:11MapTilerSDK16MTDragPanOptionsV9linearitySdSgvp)`
    
    Factor used to scale the drag velocity.
    
    Note
    
    Default: 0
    
    #### Declaration
    
    Swift
    
    ```
    public var linearity: Double?
    ```
    
-   `[maxSpeed](#/s:11MapTilerSDK16MTDragPanOptionsV8maxSpeedSdSgvp)`
    
    The maximum value of the drag velocity.
    
    Note
    
    Default: 1400
    
    #### Declaration
    
    Swift
    
    ```
    public var maxSpeed: Double?
    ```
    
-   `[deceleration](#/s:11MapTilerSDK16MTDragPanOptionsV12decelerationSdSgvp)`
    
    The rate at which the speed reduces after the pan ends.
    
    Note
    
    Default: 2500
    
    #### Declaration
    
    Swift
    
    ```
    public var deceleration: Double?
    ```
    
-   `[init(linearity:maxSpeed:deceleration:)](#/s:11MapTilerSDK16MTDragPanOptionsV9linearity8maxSpeed12decelerationACSdSg_A2Gtcfc)`
    
    Initializes the options with linearity, maxSpeed and deceleration.
    
    #### Declaration
    
    Swift
    
    ```
    public init(linearity: Double? = nil, maxSpeed: Double? = nil, deceleration: Double? = nil)
    ```
