cameraForGeometry

abstract fun cameraForGeometry(geometry: Geometry, geometryPadding: EdgeInsets? = null, bearing: Double? = null, pitch: Double? = null): CameraOptions

Deprecated

Deprecated

Replace with

cameraForCoordinates(coordinates, camera, coordinatesPadding, maxZoom, offset, result)

Convert the given geometry, geometryPadding, bearing and pitch values to CameraOptions. Note that this method takes into account the current map padding in addition to the geometryPadding provided in parameters.

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 CameraOptions. Padding is absent in the returned CameraOptions as the zoom level already accounts for the geometryPadding provided.

Parameters

geometry

The Geometry to take in account when converting

geometryPadding

The optional amount of padding in pixels to add to the given geometry.

bearing

The optional bearing to take in account when converting

pitch

The optional pitch to take in account when converting