fun calcPosition(
camera: BaseCamera,
objects: List<SimpleMapObject>,
styleZoomToTiltRelation: StyleZoomToTiltRelation? = null,
screenArea: Padding? = null,
tilt: Tilt? = null,
bearing: Bearing? = null,
size: ScreenSize? = null
): CameraPosition
Calculating the camera position such that map objects are completely 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.
styleZoomToTiltRelation
StyleZoomToTiltRelation?
Dependence function of the camera tilt angle on the style zoom level.
screenArea
Padding?
The screen area where it is necessary to fit the geometry. If not specified, then the camera padding is used for calculation.
tilt
Tilt?
Map tilt. If not specified, the current camera tilt is used.
bearing
Bearing?
Bearing of the map. If not specified, the current camera bearing is used.
size
ScreenSize?
Size of the viewing area. If not specified, the current value of ICamera::size() is used.
Returns