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

CameraOptions: [CenterZoomBearing](https://docs.maptiler.com/sdk-js/api-reference/types/CenterZoomBearing/) & {  
    elevation?: number;  
    pitch?: number;  
    roll?: number;  
}

Options common to [Map.jumpTo](https://docs.maptiler.com/sdk-js/api-reference/classes/Map/#jumpto), [Map.easeTo](https://docs.maptiler.com/sdk-js/api-reference/classes/Map/#easeto), and [Map.flyTo](https://docs.maptiler.com/sdk-js/api-reference/classes/Map/#flyto), controlling the desired location, zoom, bearing, pitch, and roll of the camera. All properties are optional, and when a property is omitted, the current camera value for that property will remain unchanged.

#### Type Declaration

-   ##### `Optional`elevation?: number
    
    The elevation of the center point in meters above sea level.
    
-   ##### `Optional`pitch?: number
    
    The desired pitch in degrees. The pitch is the angle towards the horizon measured in degrees with a range between 0 and 60 degrees. For example, pitch: 0 provides the appearance of looking straight down at the map, while pitch: 60 tilts the user's perspective towards the horizon. Increasing the pitch value is often used to display 3D objects.
    
-   ##### `Optional`roll?: number
    
    The desired roll in degrees. The roll is the angle about the camera boresight.
    

#### Example[](#example)

Set the map's initial perspective with CameraOptions

```typescript
let map = new Map({
  container: 'map',
  style: 'https://demotiles.maplibre.org/style.json',
  center: [-73.5804, 45.53483],
  pitch: 60,
  bearing: -60,
  zoom: 10
});
```

#### See[](#see)

-   [Set pitch and bearing](https://maplibre.org/maplibre-gl-js/docs/examples/set-pitch-and-bearing/)
-   [Jump to a series of locations](https://maplibre.org/maplibre-gl-js/docs/examples/jump-to-a-series-of-locations/)
-   [Fly to a location](https://maplibre.org/maplibre-gl-js/docs/examples/fly-to-a-location/)
-   [Display buildings in 3D](https://maplibre.org/maplibre-gl-js/docs/examples/display-buildings-in-3d/)
