awaitCameraForCoordinates

suspend fun MapboxMap.awaitCameraForCoordinates(coordinates: List<Point>, camera: CameraOptions, coordinatesPadding: EdgeInsets? = null, maxZoom: Double? = null, offset: ScreenCoordinate? = null): CameraOptions

Convenience method that returns the CameraOptions object for given parameters.

Return

the CameraOptions object representing the provided parameters. Empty CameraOptions (see CameraOptions.isEmpty) could be returned only if an internal error occurred.

Parameters

coordinates

The coordinates representing the bounds of the camera.

camera

The CameraOptions which will be applied before calculating the camera for the coordinates. If any of the fields in CameraOptions are not provided then the current value from the map for that field will be used.

coordinatesPadding

The amount of padding in pixels to add to the given coordinates. Note: This padding is not applied to the map but to the coordinates provided. If you want to apply padding to the map use param camera.

maxZoom

The maximum zoom level allowed in the returned camera options.

offset

The center of the given bounds relative to map center in pixels.