# GoogleMap3D


```
public final class GoogleMap3D
```

<br />

*** ** * ** ***

Controller class of the map3d functionality powering the Map3DView.

## Summary

| ### Public methods |
|---|---|
| `final https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Marker` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#addMarker(com.google.android.gms.maps3d.model.MarkerOptions)(@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/MarkerOptions options)` Adds a marker to the map. |
| `final https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/MarkerView` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#addMarkerView(com.google.android.gms.maps3d.model.MarkerViewOptions)(@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/MarkerViewOptions options)` Adds a marker view with custom Android View content to the map. |
| `final @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/Model` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#addModel(com.google.android.gms.maps3d.model.ModelOptions)(@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/ModelOptions options)` Adds a 3d model object to the map. |
| `final @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/Polygon` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#addPolygon(com.google.android.gms.maps3d.model.PolygonOptions)(@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/PolygonOptions polygonOptions)` Adds a polygon to the map. |
| `final @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/Polyline` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#addPolyline(com.google.android.gms.maps3d.model.PolylineOptions)(@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/PolylineOptions polylineOptions)` Adds a polyline to the map. |
| `final @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/Popover` | `@https://developer.android.com/reference/androidx/annotation/UiThread.html https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#addPopover(com.google.android.gms.maps3d.model.PopoverOptions)(@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/PopoverOptions options)` Adds a popover to the map. |
| `final void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#flyCameraAround(com.google.android.gms.maps3d.model.FlyAroundOptions)(@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/FlyAroundOptions options)` Moves the camera around a given point based on the specified `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/FlyAroundOptions` object. |
| `final void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#flyCameraTo(com.google.android.gms.maps3d.model.FlyToOptions)(@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 options)` Moves the camera parabolically based on the specified `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/FlyToOptions` object. |
| `final 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/GoogleMap3D#getCamera()()` Gets the current position of the camera. |
| `final https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#getCameraRestriction()()` Gets the current camera restriction. |
| `final int` | `@https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Map3DMode https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#getMapMode()()` Gets the map mode. |
| `final https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/UiControlSettings` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#getUiControlSettings()()` Gets the UI control settings for the `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/Map3DView`. |
| `final void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#setCamera(com.google.android.gms.maps3d.model.Camera)(@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/Camera camera)` Updates the 3d map camera position using the specified `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Camera` object properties. |
| `final void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#setCameraAnimationEndListener(com.google.android.gms.maps3d.OnCameraAnimationEndListener)( https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/OnCameraAnimationEndListener cameraAnimationEndListener )` Sets the camera animation end listener on the map3d view. |
| `final void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#setCameraChangedListener(com.google.android.gms.maps3d.OnCameraChangedListener)( https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/OnCameraChangedListener cameraChangedListener )` Sets the camera changed listener on the map3d view. |
| `final void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#setCameraRestriction(com.google.android.gms.maps3d.model.CameraRestriction)(https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction cameraRestriction)` Sets the camera restriction on the map3d view. |
| `final void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#setLocale(com.google.android.gms.maps3d.model.LocaleOptions)(@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/LocaleOptions localeOptions)` Sets the locale options on the map3d view. |
| `final void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#setMap3DClickListener(com.google.android.gms.maps3d.OnMap3DClickListener)(https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/OnMap3DClickListener map3DClickListener)` Sets the click listener on the map3d view. |
| `final void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#setMapMode(kotlin.Int)(@https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Map3DMode int mapMode)` Sets the map mode. |
| `final void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#setOnMapReadyListener(com.google.android.gms.maps3d.OnMapReadyListener)(https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/OnMapReadyListener mapReadyListener)` Sets the scene rendered and ready listener on the map3d view. |
| `final void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#setOnMapSteadyListener(com.google.android.gms.maps3d.OnMapSteadyListener)(https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/OnMapSteadyListener mapSteadyListener)` Sets the scene steady listener on the map3d view. |
| `final void` | `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D#stopCameraAnimation()()` Stops the current ongoing camera animation. |

## Public methods

### addMarker

```
public final Marker addMarker(@NonNull MarkerOptions options)
```

Adds a marker to the map.

| Parameters |
|---|---|
| `@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/MarkerOptions options` | The options for the marker. |

| Returns |
|---|---|
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Marker` | The created or updated marker. |

### addMarkerView

```
public final MarkerView addMarkerView(@NonNull MarkerViewOptions options)
```

Adds a marker view with custom Android View content to the map.

If `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/MarkerViewOptions#content()` is null, a default `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/PinView` will be created and used as the marker's content.

| Parameters |
|---|---|
| `@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/MarkerViewOptions options` | The options for the marker. |

| Returns |
|---|---|
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/MarkerView` | The created or updated marker. |

### addModel

```
public final @NonNull Model addModel(@NonNull ModelOptions options)
```

Adds a 3d model object to the map.

| Parameters |
|---|---|
| `@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/ModelOptions options` | The options for the model. |

| Returns |
|---|---|
| `@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/Model` | The created or updated model. |

### addPolygon

```
public final @NonNull Polygon addPolygon(@NonNull PolygonOptions polygonOptions)
```

Adds a polygon to the map.

| Parameters |
|---|---|
| `@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/PolygonOptions polygonOptions` | The options for the polygon. |

| Returns |
|---|---|
| `@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/Polygon` | The created or updated polygon. |

### addPolyline

```
public final @NonNull Polyline addPolyline(@NonNull PolylineOptions polylineOptions)
```

Adds a polyline to the map.

| Parameters |
|---|---|
| `@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/PolylineOptions polylineOptions` | The options for the polyline. |

| Returns |
|---|---|
| `@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/Polyline` | The created or updated polyline. |

### addPopover

```
@UiThread
public final @NonNull Popover addPopover(@NonNull PopoverOptions options)
```

Adds a popover to the map.

| Parameters |
|---|---|
| `@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/PopoverOptions options` | The options for the popover. |

| Returns |
|---|---|
| `@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/Popover` | The created popover. |

### flyCameraAround

```
public final void flyCameraAround(@NonNull FlyAroundOptions options)
```

Moves the camera around a given point based on the specified `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/FlyAroundOptions` object.

| Parameters |
|---|---|
| `@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/FlyAroundOptions options` | The options for the fly around. |

### flyCameraTo

```
public final void flyCameraTo(@NonNull FlyToOptions options)
```

Moves the camera parabolically based on the specified `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/FlyToOptions` object.

| Parameters |
|---|---|
| `@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 options` | The options for the fly to. |

### getCamera

```
public final Camera getCamera()
```

Gets the current position of the camera.

| Returns |
|---|---|
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Camera` | The snapshot of the current camera position in ABSOLUTE AltitudeMode.ABSOLUTE. Once returned, the caller should call this method again to get the latest camera position if the camera position may have changed. |

### getCameraRestriction

```
public final CameraRestriction getCameraRestriction()
```

Gets the current camera restriction.

| Returns |
|---|---|
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction` | The snapshot of the current camera restriction. Once returned, the caller should call this method again to get the latest camera restriction if the camera restriction may have changed. |

### getMapMode

```
@Map3DMode
public final int getMapMode()
```

Gets the map mode.

| Returns |
|---|---|
| `int` | The map mode (which is one of the values in `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Map3DMode`). |

### getUiControlSettings

```
public final UiControlSettings getUiControlSettings()
```

Gets the UI control settings for the `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/Map3DView`.

| Returns |
|---|---|
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/UiControlSettings` | The UI control settings for the `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/Map3DView` or null if not available. |

### setCamera

```
public final void setCamera(@NonNull Camera camera)
```

Updates the 3d map camera position using the specified `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Camera` object properties.

| Parameters |
|---|---|
| `@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/Camera camera` | The camera object to be used to update the current 3d map camera position. |

### setCameraAnimationEndListener

```
public final void setCameraAnimationEndListener(
    OnCameraAnimationEndListener cameraAnimationEndListener
)
```

Sets the camera animation end listener on the map3d view.

| Parameters |
|---|---|
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/OnCameraAnimationEndListener cameraAnimationEndListener` | The listener to be called when the camera animation ends. |

### setCameraChangedListener

```
public final void setCameraChangedListener(
    OnCameraChangedListener cameraChangedListener
)
```

Sets the camera changed listener on the map3d view.

| Parameters |
|---|---|
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/OnCameraChangedListener cameraChangedListener` | The listener to be called when the camera is moved. |

### setCameraRestriction

```
public final void setCameraRestriction(CameraRestriction cameraRestriction)
```

Sets the camera restriction on the map3d view. To remove or reset the camera restriction, pass a null value or a new CameraRestriction object with all the properties set to null.

| Parameters |
|---|---|
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/CameraRestriction cameraRestriction` | The camera restriction to be set on the map3d view. |

### setLocale

```
public final void setLocale(@NonNull LocaleOptions localeOptions)
```

Sets the locale options on the map3d view.

| Parameters |
|---|---|
| `@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/LocaleOptions localeOptions` | The locale options to be set on the map3d view. |

### setMap3DClickListener

```
public final void setMap3DClickListener(OnMap3DClickListener map3DClickListener)
```

Sets the click listener on the map3d view.

| Parameters |
|---|---|
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/OnMap3DClickListener map3DClickListener` | The listener to be called when a click event occurs on the map3d view. |

### setMapMode

```
public final void setMapMode(@Map3DMode int mapMode)
```

Sets the map mode.

| Parameters |
|---|---|
| `@https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Map3DMode int mapMode` | The map mode to set. |

### setOnMapReadyListener

```
public final void setOnMapReadyListener(OnMapReadyListener mapReadyListener)
```

Sets the scene rendered and ready listener on the map3d view.

| Parameters |
|---|---|
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/OnMapReadyListener mapReadyListener` | The listener to be called when the scene is rendered and ready. |

### setOnMapSteadyListener

```
public final void setOnMapSteadyListener(OnMapSteadyListener mapSteadyListener)
```

Sets the scene steady listener on the map3d view.

| Parameters |
|---|---|
| `https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/OnMapSteadyListener mapSteadyListener` | The listener to be called when the scene is steady. |

### stopCameraAnimation

```
public final void stopCameraAnimation()
```

Stops the current ongoing camera animation.