calcPosition(camera,geometry,screenArea,tilt,bearing,size)
fun calcPosition(
camera: BaseCamera,
geometry: Geometry,
screenArea: Padding? = null,
tilt: Tilt? = null,
bearing: Bearing? = null,
size: ScreenSize? = null
): CameraPosition
Calculates the camera position so that a geometric object on the map, located at a fixed camera installation point, fully fits into the screen area defined by the camera padding.
If the original camera settings do not need to be changed, then the camera copied through IBaseCamera::clone() can be used.
Parameters
camera
BaseCamera
Camera used to calculate the position.
geometry
Geometry
Geometric object 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's 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