---
title: "MTDragPanGesture | Mobile sdk | Mobile sdk ios | Ios"
description: "Handles panning the map by dragging."
---

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

# MTDragPanGesture

```
@MainActor
public struct MTDragPanGesture : MTGesture
```

Handles panning the map by dragging.

-   `[type](#/s:11MapTilerSDK16MTDragPanGestureV4typeAA13MTGestureTypeOvp)`
    
    Type of the gesture.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    public var type: MTGestureType
    ```
    
-   `[disable()](#/s:11MapTilerSDK16MTDragPanGestureV7disableyyYaF)` Asynchronous
    
    Disables the gesture on the map.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    public func disable() async
    ```
    
-   `[enable()](#/s:11MapTilerSDK16MTDragPanGestureV6enableyyYaF)` Asynchronous
    
    Enables the gesture on the map.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    public func enable() async
    ```
    
-   `[enable(with:)](#/s:11MapTilerSDK16MTDragPanGestureV6enable4withyAA0dE7OptionsV_tYaF)` Asynchronous
    
    Enables the gesture on the map with options.
    
    #### Declaration
    
    Swift
    
    ```
    @MainActor
    public func enable(with options: MTDragPanOptions) async
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>options</em></code></td><td><div><p>Drag and pan options.</p></div></td></tr></tbody></table>
