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

AnimatedRouteLayerOptions: {  
    autoplay?: boolean;  
    cameraAnimation?: [AnimatedCameraOptions](https://docs.maptiler.com/sdk-js/api-reference/types/AnimatedCameraOptions/);  
    delay?: number;  
    duration?: number;  
    easing?: [EasingFunctionName](https://docs.maptiler.com/sdk-js/api-reference/types/EasingFunctionName/);  
    iterations?: number;  
    manualUpdate?: boolean;  
    pathStrokeAnimation?: [AnimatedStrokeOptions](https://docs.maptiler.com/sdk-js/api-reference/types/AnimatedStrokeOptions/);  
} & (  
    | { keyframes: [Keyframe](https://docs.maptiler.com/sdk-js/api-reference/types/Keyframe/)\[\]; source?: never }  
    | { keyframes?: never; source: [SourceData](https://docs.maptiler.com/sdk-js/api-reference/types/SourceData/) }  
)

Configuration options for the AnimatedRouteLayer. This type supports either providing keyframes directly OR source data for the animation.

#### Type Declaration

-   ##### `Optional`autoplay?: boolean
    
    Whether the animation should autoplay
    
-   ##### `Optional`cameraAnimation?: [AnimatedCameraOptions](https://docs.maptiler.com/sdk-js/api-reference/types/AnimatedCameraOptions/)
    
    The camera animation options
    
-   ##### `Optional`delay?: number
    
    The delay in ms before playing
    
-   ##### `Optional`duration?: number
    
    The Duration in ms
    
-   ##### `Optional`easing?: [EasingFunctionName](https://docs.maptiler.com/sdk-js/api-reference/types/EasingFunctionName/)
    
    The default easing to use if not provided in teh GeoJSON
    
-   ##### `Optional`iterations?: number
    
    The number of iterations
    
-   ##### `Optional`manualUpdate?: boolean
    
    Whether the animation should auto matically animated or whether the frameAdvance method should be called
    
-   ##### `Optional`pathStrokeAnimation?: [AnimatedStrokeOptions](https://docs.maptiler.com/sdk-js/api-reference/types/AnimatedStrokeOptions/)
    
    The stroke animation options, only viable for LineString geometries
    

-   { keyframes: [Keyframe](https://docs.maptiler.com/sdk-js/api-reference/types/Keyframe/)\[\]; source?: never }
    -   ##### keyframes: [Keyframe](https://docs.maptiler.com/sdk-js/api-reference/types/Keyframe/)\[\]
        
        The keyframes for the the animation OR
        
    -   ##### `Optional`source?: never
        
-   { keyframes?: never; source: [SourceData](https://docs.maptiler.com/sdk-js/api-reference/types/SourceData/) }
    -   ##### `Optional`keyframes?: never
        
    -   ##### source: [SourceData](https://docs.maptiler.com/sdk-js/api-reference/types/SourceData/)
        
        The source data
