---
title: "TerrainGesture | JavaScript maps SDK"
description: "Documentation for MapTiler 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.

# Type Alias TerrainGesture

State of a gesture in flight over terrain, all of it living from the gesture's first handler frame to the end of its movement.

type TerrainGesture \= {  
    [anchorElevation](#anchorelevation): number | null | undefined;  
    [inFlight](#inflight): boolean;  
}

##### Index

### Properties

[anchorElevation](#anchorelevation) [inFlight](#inflight)

## Properties

### anchorElevation[](#anchorelevation)

anchorElevation: number | null | undefined

Elevation in meters of the plane a drag or zoom is solved on, sampled once per gesture from the terrain under the pointer, on the gesture's first drag or zoom frame:

-   `null`: not sampled yet, the gesture has had no drag or zoom frame.
-   a number: sampled, the elevation of the terrain point that frame grabbed.
-   `undefined`: sampled, and the terrain under the pointer was not loaded. The gesture is solved on the center's elevation to its end. Sampling again on a later frame would change how far the map moves per pixel of drag, mid-gesture, once that terrain loads.

### inFlight[](#inflight)

inFlight: boolean

Whether a gesture over terrain is in flight, and the center elevation frozen with it.
