cameraForCoordinates

abstract fun cameraForCoordinates(coordinates: List<Point>, padding: EdgeInsets, bearing: Double, pitch: Double): CameraOptions

Convenience method that returns the `camera options` object for given parameters.

Return

`camera options` object representing the provided parameters.

Parameters

bearing

The bearing of the camera.

coordinates

The `coordinates` representing the bounds of the camera.

padding

The `edge insets` of the camera.

pitch

The pitch of the camera.

abstract fun cameraForCoordinates(coordinates: List<Point>, camera: CameraOptions, box: ScreenBox): CameraOptions

Convenience method that adjusts the provided `camera options` object for given parameters. Returns the provided `camera` options with zoom adjusted to fit `coordinates` into the `box`, so that `coordinates` on the left, top and right of the effective `camera` center at the principal point of the projection (defined by `padding`) fit into the `box`. Returns the provided `camera` options object unchanged upon an error. Note that this method may fail if the principal point of the projection is not inside the `box` or if there is no sufficient screen space, defined by principal point and the `box`, to fit the geometry.

Return

`camera options` object with the zoom level adjusted to fit `coordinates` into the `box`.

Parameters

box

The `screen box` into which `coordinates` should fit.

camera

The `camera options` for which zoom should be adjusted. Note that the `camera.center` is required.

coordinates

The `coordinates` representing the bounds of the camera.