cameraForCoordinates

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

Convenience method that returns the camera options object for given arguments

Return

Returns the camera options object representing the provided params

Parameters

bearing

The bearing of the map

coordinates

The coordinates representing the bounds of the map

padding

The edge padding of the map

pitch

The pitch of the map

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

Convenience method that adjusts the provided camera options object for given arguments

Returns the provided \p camera with zoom adjusted to fit \p coordinates into \p 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 \p box. Returns the provided camera options object unchanged upon error. Note that this method may fail if the principal point of the projection is not inside \p box or if there is no sufficient screen space, defined by principal point and box, to fit the geometry.

Return

Returns the camera options object with the zoom level adjusted to fit \p coordinates into \p box.

Parameters

box

The box into which \p coordinates should fit

camera

The camera for which zoom should be adjusted. Note that \p camera.center is required.

coordinates

The coordinates representing the bounds of the map