# CameraPosition.Builder

public static final class **CameraPosition.Builder** extends [Object](https://developer.android.com/reference/java/lang/Object.html)  
Builds camera position.

### Public Constructor Summary

|---|---|
|   | [Builder](https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition.Builder#Builder())() Creates an empty builder. |
|   | [Builder](https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition.Builder#Builder(com.google.android.gms.maps.model.CameraPosition))([CameraPosition](https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition) previous) |

### Public Method Summary

|---|---|
| [CameraPosition.Builder](https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition.Builder) | [bearing](https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition.Builder#bearing(float))(float bearing) Sets the direction that the camera is pointing in, in degrees clockwise from north. |
| [CameraPosition](https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition) | [build](https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition.Builder#build())() Builds a `https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition`. |
| [CameraPosition.Builder](https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition.Builder) | [target](https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition.Builder#target(com.google.android.gms.maps.model.LatLng))([LatLng](https://developers.google.com/android/reference/com/google/android/gms/maps/model/LatLng) location) Sets the location that the camera is pointing at. |
| [CameraPosition.Builder](https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition.Builder) | [tilt](https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition.Builder#tilt(float))(float tilt) Sets the angle, in degrees, of the camera from the nadir (directly facing the Earth). |
| [CameraPosition.Builder](https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition.Builder) | [zoom](https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition.Builder#zoom(float))(float zoom) Sets the zoom level of the camera. |

### Inherited Method Summary

From class java.lang.Object

|---|---|
| [Object](https://developer.android.com/reference/java/lang/Object.html) | clone() |
| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |
| void | finalize() |
| final [Class](https://developer.android.com/reference/java/lang/Class.html)\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

## Public Constructors

#### public **Builder** ()

Creates an empty builder.

#### public **Builder** ([CameraPosition](https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition) previous)

## Public Methods

#### public [CameraPosition.Builder](https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition.Builder)
**bearing** (float bearing)

Sets the direction that the camera is pointing in, in degrees clockwise from
north.

#### public [CameraPosition](https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition)
**build** ()

Builds a `https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition`.

#### public [CameraPosition.Builder](https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition.Builder)
**target** ([LatLng](https://developers.google.com/android/reference/com/google/android/gms/maps/model/LatLng) location)

Sets the location that the camera is pointing at.

#### public [CameraPosition.Builder](https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition.Builder)
**tilt** (float tilt)

Sets the angle, in degrees, of the camera from the nadir (directly facing the
Earth). When changing the camera position for a map, this value is restricted depending
on the zoom level of the camera. The restrictions are as follows:

- For zoom levels less than 10 the maximum is 30.
- For zoom levels from 10 to 14 the maximum increases linearly from 30 to 45 (e.g. at zoom level 12, the maximum is 37.5).
- For zoom levels from 14 to 15.5 the maximum increases linearly from 45 to 67.5.
- For zoom levels greater than 15.5 the maximum is 67.5.
The minimum is always 0 (directly down). If you specify a value outside this range and try to move the camera to this camera position it will be clamped to these bounds.

#### public [CameraPosition.Builder](https://developers.google.com/android/reference/com/google/android/gms/maps/model/CameraPosition.Builder)
**zoom** (float zoom)

Sets the zoom level of the camera. Zoom level is defined such that at zoom level 0,
the whole world is approximately 256dp wide (assuming that the camera is not tilted).
Increasing the zoom level by 1 doubles the width of the world on the screen. Hence at
zoom level N, the width of the world is approximately 256 \* 2 ^N^ dp, i.e., at
zoom level 2, the whole world is approximately 1024dp wide.

When changing the camera position for a map, the zoom level of the camera is
restricted to a certain range depending on various factors including location, map type
and map size. Use `https://developers.google.com/android/reference/com/google/android/gms/maps/GoogleMap#getMinZoomLevel()`
and `https://developers.google.com/android/reference/com/google/android/gms/maps/GoogleMap#getMaxZoomLevel()`
to find the restrictions. Note that the camera zoom need not be an integer value.