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

FitBoundsOptions: [FlyToOptions](https://docs.maptiler.com/sdk-js/api-reference/types/FlyToOptions/) & {  
    linear?: boolean;  
    maxZoom?: number;  
    offset?: [PointLike](https://docs.maptiler.com/sdk-js/api-reference/types/PointLike/);  
}

Options for [Map.fitBounds](https://docs.maptiler.com/sdk-js/api-reference/classes/Map/#fitbounds) method

#### Type Declaration

-   ##### `Optional`linear?: boolean
    
    If `true`, the map transitions using [Map.easeTo](https://docs.maptiler.com/sdk-js/api-reference/classes/Map/#easeto). If `false`, the map transitions using [Map.flyTo](https://docs.maptiler.com/sdk-js/api-reference/classes/Map/#flyto). See those functions and [AnimationOptions](https://docs.maptiler.com/sdk-js/api-reference/types/AnimationOptions/) for information about options available.
    
    #### Default Value[](#default-value)
    
    ```typescript
    false
    ```
    
-   ##### `Optional`maxZoom?: number
    
    The maximum zoom level to allow when the map view transitions to the specified bounds.
    
-   ##### `Optional`offset?: [PointLike](https://docs.maptiler.com/sdk-js/api-reference/types/PointLike/)
    
    The center of the given bounds relative to the map's center, measured in pixels.
    
    #### Default Value[](#default-value-1)
    
    ```json
    [0, 0]
    ```
