---
title: "MTEvent | Mobile sdk | Mobile sdk ios | Ios"
description: "Events triggered by the SDK"
---

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

# MTEvent

```
public enum MTEvent : String
```

Events triggered by the SDK

-   `[popupDidOpen](#/s:11MapTilerSDK7MTEventO12popupDidOpenyA2CmF)`
    
    Triggered when a popup has been opened and added to the map.
    
    #### Declaration
    
    Swift
    
    ```
    case popupDidOpen = "open"
    ```
    
-   `[popupDidClose](#/s:11MapTilerSDK7MTEventO13popupDidCloseyA2CmF)`
    
    Triggered when a popup has been closed and removed from the map.
    
    #### Declaration
    
    Swift
    
    ```
    case popupDidClose = "close"
    ```
    
-   `[boxZoomDidCancel](#/s:11MapTilerSDK7MTEventO16boxZoomDidCancelyA2CmF)`
    
    Triggered when the user cancels a “box zoom” interaction, or when the bounding box does not meet the minimum size threshold.
    
    #### Declaration
    
    Swift
    
    ```
    case boxZoomDidCancel = "boxzoomcancel"
    ```
    
-   `[boxZoomDidEnd](#/s:11MapTilerSDK7MTEventO13boxZoomDidEndyA2CmF)`
    
    Triggered when a “box zoom” interaction ends.
    
    #### Declaration
    
    Swift
    
    ```
    case boxZoomDidEnd = "boxzoomend"
    ```
    
-   `[boxZoomDidStart](#/s:11MapTilerSDK7MTEventO15boxZoomDidStartyA2CmF)`
    
    Triggered when a “box zoom” interaction starts.
    
    #### Declaration
    
    Swift
    
    ```
    case boxZoomDidStart = "boxzoomstart"
    ```
    
-   `[didTap](#/s:11MapTilerSDK7MTEventO6didTapyA2CmF)`
    
    Triggered when user taps and releases at the same point on the map.
    
    #### Declaration
    
    Swift
    
    ```
    case didTap = "click"
    ```
    
-   `[didPreventCooperativeGesture](#/s:11MapTilerSDK7MTEventO28didPreventCooperativeGestureyA2CmF)`
    
    Triggered whenever the cooperativeGestures option prevents a gesture from being handled by the map.
    
    #### Declaration
    
    Swift
    
    ```
    case didPreventCooperativeGesture = "cooperativegestureprevented"
    ```
    
-   `[dataDidUpdate](#/s:11MapTilerSDK7MTEventO13dataDidUpdateyA2CmF)`
    
    Triggered when any map data loads or changes.
    
    #### Declaration
    
    Swift
    
    ```
    case dataDidUpdate = "data"
    ```
    
-   `[dataUpdateDidAbort](#/s:11MapTilerSDK7MTEventO18dataUpdateDidAbortyA2CmF)`
    
    Triggered when a request for one of the map’s sources’ tiles is aborted. Triggered when a request for one of the map’s sources’ data is aborted.
    
    #### Declaration
    
    Swift
    
    ```
    case dataUpdateDidAbort = "dataabort"
    ```
    
-   `[dataLoadingDidStart](#/s:11MapTilerSDK7MTEventO19dataLoadingDidStartyA2CmF)`
    
    Triggered when any map data (style, source, tile, etc) begins loading or changing asynchronously.
    
    All data loading events are followed by a dataDidUpdate, dataUpdateDidAbort or error events.
    
    #### Declaration
    
    Swift
    
    ```
    case dataLoadingDidStart = "dataloading"
    ```
    
-   `[didDoubleTap](#/s:11MapTilerSDK7MTEventO12didDoubleTapyA2CmF)`
    
    Triggered when a user taps and releases twice at the same point on the map in rapid succession.
    
    #### Declaration
    
    Swift
    
    ```
    case didDoubleTap = "doubleTapped"
    ```
    
-   `[isDragging](#/s:11MapTilerSDK7MTEventO10isDraggingyA2CmF)`
    
    Triggered repeatedly during a “drag to pan” interaction
    
    #### Declaration
    
    Swift
    
    ```
    case isDragging = "drag"
    ```
    
-   `[dragDidEnd](#/s:11MapTilerSDK7MTEventO10dragDidEndyA2CmF)`
    
    Triggered when a “drag to pan” interaction ends.
    
    #### Declaration
    
    Swift
    
    ```
    case dragDidEnd = "dragend"
    ```
    
-   `[dragDidStart](#/s:11MapTilerSDK7MTEventO12dragDidStartyA2CmF)`
    
    Triggered when a “drag to pan” interaction starts.
    
    #### Declaration
    
    Swift
    
    ```
    case dragDidStart = "dragstart"
    ```
    
-   `[isIdle](#/s:11MapTilerSDK7MTEventO6isIdleyA2CmF)`
    
    Triggered after the last frame rendered before the map enters an “idle” state.
    
    Idle state means that no camera transitions are in progress, all currently requested tiles have loaded, and all fade/transition animations have completed
    
    #### Declaration
    
    Swift
    
    ```
    case isIdle = "idle"
    ```
    
-   `[didLoad](#/s:11MapTilerSDK7MTEventO7didLoadyA2CmF)`
    
    Triggered immediately after all necessary resources have been downloaded and the first visually complete rendering of the map has occurred.
    
    #### Declaration
    
    Swift
    
    ```
    case didLoad = "load"
    ```
    
-   `[didLoadWithTerrain](#/s:11MapTilerSDK7MTEventO18didLoadWithTerrainyA2CmF)`
    
    Triggered only once in a Map instance lifecycle, when both the load event and the terrain event with non-null terrain are triggered.
    
    #### Declaration
    
    Swift
    
    ```
    case didLoadWithTerrain = "loadWithTerrain"
    ```
    
-   `[isMoving](#/s:11MapTilerSDK7MTEventO8isMovingyA2CmF)`
    
    Triggered repeatedly during an animated transition from one view to another, as the result of either user interaction or methods such as flyTo.
    
    #### Declaration
    
    Swift
    
    ```
    case isMoving = "move"
    ```
    
-   `[moveDidEnd](#/s:11MapTilerSDK7MTEventO10moveDidEndyA2CmF)`
    
    Triggered just after the map completes a transition from one view to another, as the result of either user interaction or methods such as jumpTo.
    
    #### Declaration
    
    Swift
    
    ```
    case moveDidEnd = "moveend"
    ```
    
-   `[moveDidStart](#/s:11MapTilerSDK7MTEventO12moveDidStartyA2CmF)`
    
    Triggered just before the map begins a transition from one view to another, as the result of either user interaction or methods such as jumpTo.
    
    #### Declaration
    
    Swift
    
    ```
    case moveDidStart = "movestart"
    ```
    
-   `[didUpdatePitch](#/s:11MapTilerSDK7MTEventO14didUpdatePitchyA2CmF)`
    
    Triggered repeatedly during the map’s pitch (tilt) animation between one state and another as the result of either user interaction or methods such as flyTo.
    
    #### Declaration
    
    Swift
    
    ```
    case didUpdatePitch = "pitch"
    ```
    
-   `[pitchUpdateDidEnd](#/s:11MapTilerSDK7MTEventO17pitchUpdateDidEndyA2CmF)`
    
    Triggered immediately after the map’s pitch (tilt) finishes changing as the result of either user interaction or methods such as flyTo.
    
    #### Declaration
    
    Swift
    
    ```
    case pitchUpdateDidEnd = "pitchend"
    ```
    
-   `[pitchUpdateDidStart](#/s:11MapTilerSDK7MTEventO19pitchUpdateDidStartyA2CmF)`
    
    Triggered whenever the map’s pitch (tilt) begins a change as the result of either user interaction or methods such as flyTo .
    
    #### Declaration
    
    Swift
    
    ```
    case pitchUpdateDidStart = "pitchstart"
    ```
    
-   `[projectionDidModify](#/s:11MapTilerSDK7MTEventO19projectionDidModifyyA2CmF)`
    
    Triggered when map’s projection is modified in other ways than by map being moved.
    
    #### Declaration
    
    Swift
    
    ```
    case projectionDidModify = "projectiontransition"
    ```
    
-   `[isReady](#/s:11MapTilerSDK7MTEventO7isReadyyA2CmF)`
    
    Triggered only once after load and wait for all the controls managed by the Map constructor to be dealt with.
    
    Since the ready event waits that all the basic controls are nicely positioned, it is safer to use ready than load if you plan to add other custom controls.
    
    #### Declaration
    
    Swift
    
    ```
    case isReady = "ready"
    ```
    
-   `[didRemove](#/s:11MapTilerSDK7MTEventO9didRemoveyA2CmF)`
    
    Triggered immediately after the map has been removed.
    
    #### Declaration
    
    Swift
    
    ```
    case didRemove = "remove"
    ```
    
-   `[didRender](#/s:11MapTilerSDK7MTEventO9didRenderyA2CmF)`
    
    Triggered whenever the map is drawn to the screen.
    
    Drawing occurs with a change to the map’s position, zoom, pitch, or bearing, a change to the map’s style, a change to a GeoJSON source, or the loading of a vector tile, GeoJSON file, glyph, or sprite.
    
    #### Declaration
    
    Swift
    
    ```
    case didRender = "render"
    ```
    
-   `[didResize](#/s:11MapTilerSDK7MTEventO9didResizeyA2CmF)`
    
    Triggered immediately after the map has been resized.
    
    #### Declaration
    
    Swift
    
    ```
    case didResize = "resize"
    ```
    
-   `[isRotating](#/s:11MapTilerSDK7MTEventO10isRotatingyA2CmF)`
    
    Triggered repeatedly during a “drag to rotate” interaction.
    
    #### Declaration
    
    Swift
    
    ```
    case isRotating = "rotate"
    ```
    
-   `[rotateDidEnd](#/s:11MapTilerSDK7MTEventO12rotateDidEndyA2CmF)`
    
    Triggered when a “drag to rotate” interaction ends.
    
    #### Declaration
    
    Swift
    
    ```
    case rotateDidEnd = "rotateend"
    ```
    
-   `[rotateDidStart](#/s:11MapTilerSDK7MTEventO14rotateDidStartyA2CmF)`
    
    Triggered when a “drag to rotate” interaction starts.
    
    #### Declaration
    
    Swift
    
    ```
    case rotateDidStart = "rotatestart"
    ```
    
-   `[sourceDidUpdate](#/s:11MapTilerSDK7MTEventO15sourceDidUpdateyA2CmF)`
    
    Triggered when one of the map’s sources loads or changes, including if a tile belonging to a source loads or changes.
    
    #### Declaration
    
    Swift
    
    ```
    case sourceDidUpdate = "sourcedata"
    ```
    
-   `[sourceUpdateDidAbort](#/s:11MapTilerSDK7MTEventO20sourceUpdateDidAbortyA2CmF)`
    
    Triggered when a request for one of the map’s sources’ data is aborted.
    
    #### Declaration
    
    Swift
    
    ```
    case sourceUpdateDidAbort = "sourcedataabort"
    ```
    
-   `[sourceUpdateDidStart](#/s:11MapTilerSDK7MTEventO20sourceUpdateDidStartyA2CmF)`
    
    Triggered when one of the map’s sources begins loading or changing asynchronously.
    
    All sourceUpdateDidStart events are followed by a sourceDidUpdate, sourceUpdateDidAbort or error events.
    
    #### Declaration
    
    Swift
    
    ```
    case sourceUpdateDidStart = "sourcedataloading"
    ```
    
-   `[styleDidUpdate](#/s:11MapTilerSDK7MTEventO14styleDidUpdateyA2CmF)`
    
    Triggered when the map’s style loads or changes.
    
    #### Declaration
    
    Swift
    
    ```
    case styleDidUpdate = "styledata"
    ```
    
-   `[styleUpdateDidStart](#/s:11MapTilerSDK7MTEventO19styleUpdateDidStartyA2CmF)`
    
    Triggered when the map’s style begins loading or changing asynchronously.
    
    All styleUpdateDidStart events are followed by a styleDidUpdate or error events.
    
    #### Declaration
    
    Swift
    
    ```
    case styleUpdateDidStart = "styledataloading"
    ```
    
-   `[styleImageIsMissing](#/s:11MapTilerSDK7MTEventO19styleImageIsMissingyA2CmF)`
    
    Triggered when an icon or pattern needed by the style is missing.
    
    #### Declaration
    
    Swift
    
    ```
    case styleImageIsMissing = "styleimagemissing"
    ```
    
-   `[didTriggerTerrain](#/s:11MapTilerSDK7MTEventO17didTriggerTerrainyA2CmF)`
    
    Triggered when a terrain event occurs within the map.
    
    #### Declaration
    
    Swift
    
    ```
    case didTriggerTerrain = "terrain"
    ```
    
-   `[terrainAnimationDidStart](#/s:11MapTilerSDK7MTEventO24terrainAnimationDidStartyA2CmF)`
    
    The terrainAnimationDidStart event is triggered when the animation begins transitioning between terrain and non-terrain states.
    
    #### Declaration
    
    Swift
    
    ```
    case terrainAnimationDidStart = "terrainAnimationStart"
    ```
    
-   `[terrainAnimationDidStop](#/s:11MapTilerSDK7MTEventO23terrainAnimationDidStopyA2CmF)`
    
    The terrainAnimationDidStop event is triggered when the animation between terrain and non-terrain states ends.
    
    #### Declaration
    
    Swift
    
    ```
    case terrainAnimationDidStop = "terrainAnimationStop"
    ```
    
-   `[touchDidCancel](#/s:11MapTilerSDK7MTEventO14touchDidCancelyA2CmF)`
    
    Triggered when a touch is cancelled within the map.
    
    #### Declaration
    
    Swift
    
    ```
    case touchDidCancel = "touchcancel"
    ```
    
-   `[touchDidEnd](#/s:11MapTilerSDK7MTEventO11touchDidEndyA2CmF)`
    
    Triggered when a touch ends within the map.
    
    #### Declaration
    
    Swift
    
    ```
    case touchDidEnd = "touchend"
    ```
    
-   `[touchDidMove](#/s:11MapTilerSDK7MTEventO12touchDidMoveyA2CmF)`
    
    Triggered when a touch moves within the map.
    
    #### Declaration
    
    Swift
    
    ```
    case touchDidMove = "touchmove"
    ```
    
-   `[touchDidStart](#/s:11MapTilerSDK7MTEventO13touchDidStartyA2CmF)`
    
    Triggered when a touch starts within the map.
    
    #### Declaration
    
    Swift
    
    ```
    case touchDidStart = "touchstart"
    ```
    
-   `[isZooming](#/s:11MapTilerSDK7MTEventO9isZoomingyA2CmF)`
    
    Triggered repeatedly during an animated transition from one zoom level to another, as the result of either user interaction or methods such as flyTo.
    
    #### Declaration
    
    Swift
    
    ```
    case isZooming = "zoom"
    ```
    
-   `[zoomDidEnd](#/s:11MapTilerSDK7MTEventO10zoomDidEndyA2CmF)`
    
    Triggered just after the map completes a transition from one zoom level to another, as the result of either user interaction or methods such as flyTo.
    
    #### Declaration
    
    Swift
    
    ```
    case zoomDidEnd = "zoomend"
    ```
    
-   `[zoomDidStart](#/s:11MapTilerSDK7MTEventO12zoomDidStartyA2CmF)`
    
    Triggered just before the map begins a transition from one zoom level to another, as the result of either user interaction or methods such as flyTo.
    
    #### Declaration
    
    Swift
    
    ```
    case zoomDidStart = "zoomstart"
    ```
