---
title: "CallbackData | Elevation profile | JavaScript maps SDK"
description: "Documentation for Elevation Profile Control"
---

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

Event data to `onMove` and `onClick` callback

type CallbackData \= {  
    [distance](#distance): number;  
    [dPlus](#dplus): number;  
    [gradePercent](#gradepercent): number;  
    [position](#position): Position;  
}

-   Defined in [elevationprofile.ts:80](https://github.com/maptiler/maptiler-elevation-profile-control/blob/d743345a80a057304068c68d525af7f308519fb1/src/elevationprofile.ts#L80)

##### Index

### Properties

[distance](#distance) [dPlus](#dplus) [gradePercent](#gradepercent) [position](#position)

## Properties

### distance[](#distance)

distance: number

The distance from the start of the route. In km if the component has been set with the unit "metric" (default) of in miles if the unit is "imperial".

-   Defined in [elevationprofile.ts:91](https://github.com/maptiler/maptiler-elevation-profile-control/blob/d743345a80a057304068c68d525af7f308519fb1/src/elevationprofile.ts#L91)

### dPlus[](#dplus)

dPlus: number

Cumulated positive elevation from the begining of the route up to this location. In meters if the component has been set with the unit "metric" (default) of in feet if the unit is "imperial".

-   Defined in [elevationprofile.ts:97](https://github.com/maptiler/maptiler-elevation-profile-control/blob/d743345a80a057304068c68d525af7f308519fb1/src/elevationprofile.ts#L97)

### gradePercent[](#gradepercent)

gradePercent: number

Slope grade in percentage (1% being a increase of 1m on a 100m distance)

-   Defined in [elevationprofile.ts:101](https://github.com/maptiler/maptiler-elevation-profile-control/blob/d743345a80a057304068c68d525af7f308519fb1/src/elevationprofile.ts#L101)

### position[](#position)

position: Position

The position as `[lon, lat, elevation]`. Elevation will be in meters if the component has been set with the unit "metric" (default) of in feet if the unit is "imperial".

-   Defined in [elevationprofile.ts:86](https://github.com/maptiler/maptiler-elevation-profile-control/blob/d743345a80a057304068c68d525af7f308519fb1/src/elevationprofile.ts#L86)
