# FlyToOptions


```
public class FlyToOptions implements Parcelable
```

<br />

*** ** * ** ***

Represents the camera preset, fly to, in a 3D map.

## Summary

| ### Public fields |
|---|---|
| `long` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/FlyToOptions#durationInMillis()` |
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Camera` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/FlyToOptions#endCamera()` |

| ### Public constructors |
|---|
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/FlyToOptions#FlyToOptions(com.google.android.gms.maps3d.model.Camera,long)(https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Camera endCamera, long durationInMillis)` Constructor for FlyToOptions with parameters for required fields. |

| ### Public methods |
|---|---|
| `long` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/FlyToOptions#getDurationInMillis()()` The duration of the fly to animation in milliseconds. |
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Camera` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/FlyToOptions#getEndCamera()()` The camera view at the end of the fly to animation. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/FlyToOptions#setDurationInMillis(long)(long durationInMillis)` Sets the duration of the fly to animation in milliseconds. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/FlyToOptions#setEndCamera(com.google.android.gms.maps3d.model.Camera)(https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Camera endCamera)` Sets the camera view at the end of the fly to animation. |
| `void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/FlyToOptions#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/FlyToOptions#(com.google.android.gms.maps3d.model.FlyToOptions).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/FlyToOptions receiver)` Validates a specified `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/FlyToOptions` 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

### durationInMillis

```
public long durationInMillis
```

### endCamera

```
public Camera endCamera
```

## Public constructors

### FlyToOptions

```
public FlyToOptions(Camera endCamera, long durationInMillis)
```

Constructor for FlyToOptions with parameters for required fields.

| Parameters |
|---|---|
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Camera endCamera` | The camera view at the end of the fly to animation. |
| `long durationInMillis` | The duration of the fly to animation in milliseconds. |

## Public methods

### getDurationInMillis

```
public long getDurationInMillis()
```

The duration of the fly to animation in milliseconds.

### getEndCamera

```
public Camera getEndCamera()
```

The camera view at the end of the fly to animation.

### setDurationInMillis

```
public void setDurationInMillis(long durationInMillis)
```

Sets the duration of the fly to animation in milliseconds.

### setEndCamera

```
public void setEndCamera(Camera endCamera)
```

Sets the camera view at the end of the fly to animation.

### writeToParcel

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

## Extension functions

### ValidatorsKt.validate

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

Validates a specified `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/FlyToOptions` 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/FlyToOptions` is not valid. |