# CameraRestriction


```
public class CameraRestriction implements Parcelable
```

<br />

*** ** * ** ***

Defines the restrictions that can be applied to a camera.

## Summary

| ### Public fields |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#bounds()` |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#maxAltitude()` |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#maxHeading()` |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#maxTilt()` |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#minAltitude()` |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#minHeading()` |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#minTilt()` |

| ### Public constructors |
|---|
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#CameraRestriction(java.lang.Double,java.lang.Double,java.lang.Double,java.lang.Double,java.lang.Double,java.lang.Double,com.google.android.gms.maps3d.model.LatLngBounds)( @https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html minAltitude, @https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html maxAltitude, @https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html minHeading, @https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html maxHeading, @https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html minTilt, @https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html maxTilt, @https://developer.android.com/reference/androidx/annotation/Nullable.html https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds bounds )` Constructor for CameraRestriction with parameters for required fields. |

| ### Public methods |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#getBounds()()` The bounds of the camera. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#getMaxAltitude()()` The maximum altitude of the camera. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#getMaxHeading()()` The maximum heading of the camera. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#getMaxTilt()()` The maximum tilt of the camera. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#getMinAltitude()()` The minimum altitude of the camera. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#getMinHeading()()` The minimum heading of the camera. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#getMinTilt()()` The minimum tilt of the camera. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#setBounds(com.google.android.gms.maps3d.model.LatLngBounds)(@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds bounds)` Sets the bounds of the camera. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#setMaxAltitude(java.lang.Double)(@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html maxAltitude)` Sets the maximum altitude of the camera. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#setMaxHeading(java.lang.Double)(@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html maxHeading)` Sets the maximum heading of the camera. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#setMaxTilt(java.lang.Double)(@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html maxTilt)` Sets the maximum tilt of the camera. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#setMinAltitude(java.lang.Double)(@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html minAltitude)` Sets the minimum altitude of the camera. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#setMinHeading(java.lang.Double)(@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html minHeading)` Sets the minimum heading of the camera. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#setMinTilt(java.lang.Double)(@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html minTilt)` Sets the minimum tilt of the camera. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#writeToParcel(android.os.Parcel,int)(https://developer.android.com/reference/android/os/Parcel.html dest, int flags)` |

| ### Extension functions |
|---|---|
| `final void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/ValidatorsKt.https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction#(com.google.android.gms.maps3d.model.CameraRestriction).validate()(@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction receiver)` Validates a specified `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction` object. |

### Inherited Constants

From [android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) `static final int` `https://developer.android.com/reference/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR = 1` `static final int` `https://developer.android.com/reference/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE = 1`

### Inherited methods

From [android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) `abstract int` `https://developer.android.com/reference/android/os/Parcelable.html#describeContents()()`

## Public fields

### bounds

```
public @Nullable LatLngBounds bounds
```

### maxAltitude

```
public @Nullable Double maxAltitude
```

### maxHeading

```
public @Nullable Double maxHeading
```

### maxTilt

```
public @Nullable Double maxTilt
```

### minAltitude

```
public @Nullable Double minAltitude
```

### minHeading

```
public @Nullable Double minHeading
```

### minTilt

```
public @Nullable Double minTilt
```

## Public constructors

### CameraRestriction

```
public CameraRestriction(
    @Nullable Double minAltitude,
    @Nullable Double maxAltitude,
    @Nullable Double minHeading,
    @Nullable Double maxHeading,
    @Nullable Double minTilt,
    @Nullable Double maxTilt,
    @Nullable LatLngBounds bounds
)
```

Constructor for CameraRestriction with parameters for required fields.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html minAltitude` | The minimum altitude of the camera. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html maxAltitude` | The maximum altitude of the camera. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html minHeading` | The minimum heading of the camera. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html maxHeading` | The maximum heading of the camera. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html minTilt` | The minimum tilt of the camera. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developer.android.com/reference/java/lang/Double.html maxTilt` | The maximum tilt of the camera. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable.html https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LatLngBounds bounds` | The bounds of the camera. |

## Public methods

### getBounds

```
public @Nullable LatLngBounds getBounds()
```

The bounds of the camera.

### getMaxAltitude

```
public @Nullable Double getMaxAltitude()
```

The maximum altitude of the camera.

### getMaxHeading

```
public @Nullable Double getMaxHeading()
```

The maximum heading of the camera.

### getMaxTilt

```
public @Nullable Double getMaxTilt()
```

The maximum tilt of the camera.

### getMinAltitude

```
public @Nullable Double getMinAltitude()
```

The minimum altitude of the camera.

### getMinHeading

```
public @Nullable Double getMinHeading()
```

The minimum heading of the camera.

### getMinTilt

```
public @Nullable Double getMinTilt()
```

The minimum tilt of the camera.

### setBounds

```
public void setBounds(@Nullable LatLngBounds bounds)
```

Sets the bounds of the camera.

### setMaxAltitude

```
public void setMaxAltitude(@Nullable Double maxAltitude)
```

Sets the maximum altitude of the camera.

### setMaxHeading

```
public void setMaxHeading(@Nullable Double maxHeading)
```

Sets the maximum heading of the camera.

### setMaxTilt

```
public void setMaxTilt(@Nullable Double maxTilt)
```

Sets the maximum tilt of the camera.

### setMinAltitude

```
public void setMinAltitude(@Nullable Double minAltitude)
```

Sets the minimum altitude of the camera.

### setMinHeading

```
public void setMinHeading(@Nullable Double minHeading)
```

Sets the minimum heading of the camera.

### setMinTilt

```
public void setMinTilt(@Nullable Double minTilt)
```

Sets the minimum tilt of the camera.

### writeToParcel

```
public void writeToParcel(Parcel dest, int flags)
```

## Extension functions

### ValidatorsKt.validate

```
public final void ValidatorsKt.validate(@NonNull CameraRestriction receiver)
```

Validates a specified `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction` object.

| Throws |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-illegal-argument-exception/index.html` | If the `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction` is not valid. |