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

Options common to map movement methods that involve animation, such as [Map.panBy](https://docs.maptiler.com/sdk-js/api-reference/classes/Map/#panby) and [Map.easeTo](https://docs.maptiler.com/sdk-js/api-reference/classes/Map/#easeto), controlling the duration and easing function of the animation. All properties are optional.

type AnimationOptions \= {  
    [animate](#animate)?: boolean;  
    [duration](#duration)?: number;  
    [easing](#easing)?: (\_: number) \=> number;  
    [essential](#essential)?: boolean;  
    [freezeElevation](#freezeelevation)?: boolean;  
    [offset](#offset)?: [PointLike](https://docs.maptiler.com/sdk-js/api-reference/types/PointLike/);  
}

##### Index

### Properties[](#properties)

[animate?](#animate) [duration?](#duration) [easing?](#easing) [essential?](#essential) [freezeElevation?](#freezeelevation) [offset?](#offset)

## Properties[](#properties-1)

### `Optional`animate[](#animate)

animate?: boolean

If `false`, no animation will occur.

### `Optional`duration[](#duration)

duration?: number

The animation's duration, measured in milliseconds.

### `Optional`easing[](#easing)

easing?: (\_: number) \=> number

A function taking a time in the range 0..1 and returning a number where 0 is the initial state and 1 is the final state.

### `Optional`essential[](#essential)

essential?: boolean

If `true`, then the animation is considered essential and will not be affected by [`prefers-reduced-motion`](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion).

### `Optional`freezeElevation[](#freezeelevation)

freezeElevation?: boolean

Default false. Needed in 3D maps to let the camera stay in a constant height based on sea-level. After the animation finished the zoom-level will be recalculated in respect of the distance from the camera to the center-coordinate-altitude.

### `Optional`offset[](#offset)

offset?: [PointLike](https://docs.maptiler.com/sdk-js/api-reference/types/PointLike/)

of the target center relative to real map container center at the end of animation.
