fun calcPosition(
camera: BaseCamera,
geometry: Geometry,
styleZoomToTiltRelation: StyleZoomToTiltRelation? = null,
screenArea: Padding? = null,
tilt: Tilt? = null,
bearing: Bearing? = null,
size: ScreenSize? = null
): CameraPosition
Calculating the camera position such that, given a constant camera installation point, the geometric object located on the map fits into the screen area specified by the camera padding.
If you do not need to change the settings of the original camera, then you can configure the camera copied via IBaseCamera::clone().
camera
BaseCamera
Camera used for calculating the position.
geometry
Geometry
Geometric object 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?
Screen area into which to fit the geometry. 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?
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.