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

CameraForBoundsOptions: [CameraOptions](https://docs.maptiler.com/sdk-js/api-reference/types/CameraOptions/) & {  
    maxZoom?: number;  
    offset?: [PointLike](https://docs.maptiler.com/sdk-js/api-reference/types/PointLike/);  
    padding?: number | [PaddingOptions](https://docs.maptiler.com/sdk-js/api-reference/types/PaddingOptions/);  
}

A options object for the [Map.cameraForBounds](https://docs.maptiler.com/sdk-js/api-reference/classes/Map/#cameraforbounds) method

#### Type Declaration

-   ##### `Optional`maxZoom?: number
    
    The maximum zoom level to allow when the camera would transition 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)
    
    ```json
    [0, 0]
    ```
    
-   ##### `Optional`padding?: number | [PaddingOptions](https://docs.maptiler.com/sdk-js/api-reference/types/PaddingOptions/)
    
    The amount of padding in pixels to add to the given bounds.
