---
title: "GetElevation | 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 GetElevation

GetElevation: (x: number, y: number) \=> number

Samples the terrain elevation, in meters, at a point given in tile coordinates.

Implementations are bound to a specific tile, so `x` and `y` are interpreted within that tile. A missing function means the map has no terrain, in which case callers treat the elevation as 0.

#### Type Declaration

-   -   (x: number, y: number): number
    -   #### Parameters
        
        -   x: number
            
            the x coordinate within the tile
            
        -   y: number
            
            the y coordinate within the tile
            
        
        #### Returns number
        
        the terrain elevation in meters
