cameraForCoordinates

Convert to a camera options from a given list of points, padding, bearing and pitch values.

In order for this method to produce correct results MapView must be already measured and inflated to have correct width and height values. Calling this method in Activity.onCreate will lead to incorrect results.

Return

Returns the converted camera options

Parameters

bearing

The optional bearing to take in account when converting

coordinates

The List of coordinates to take in account when converting

padding

The additional padding to take in account when converting

pitch

The optional pitch to take in account when converting

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

Convenience method that returns the camera options object for given arguments

In order for this method to produce correct results MapView must be already measured and inflated to have correct width and height values. Calling this method in Activity.onCreate will lead to incorrect results.

Returns the camera options object for given arguments with zoom adjusted to fit \p coordinates into \p box, so that coordinates on the left, top and right of \p camera.center fit into \p box. Returns the provided camera options object unchanged upon error.

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

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