calcPosition(camera,objects,screenArea,tilt,bearing,size)
fun calcPosition(
camera: BaseCamera,
objects: List<SimpleMapObject>,
screenArea: Padding? = null,
tilt: Tilt? = null,
bearing: Bearing? = null,
size: ScreenSize? = null
): CameraPosition
Calculation of the camera position so that the map objects fully fit into the screen area specified by the screen_area parameter.
Parameters
camera
BaseCamera
Camera used to calculate the position.
objects
List<SimpleMapObject>
Map objects to fit into the screen area specified by the screen_area parameter.
screenArea
Padding?
Area of the screen to fit the geometry into. If not specified, the camera padding is used for calculation.
tilt
Tilt?
Map tilt. If not specified, the current camera tilt is used.
bearing
Bearing?
Map rotation. If not specified, then the current camera rotation is used.
size
ScreenSize?
Size of the viewing area. If not specified, the value from ICamera::size() is used.
Returns