calculateFromMapRectangle

open fun calculateFromMapRectangle(@NonNull() mapRectangle: MapRectangle, @NonNull() mapCenter: MapCenter, rotation: Float, tilt: Float, maxZoomLevel: Float): CameraState.PositionOrientation

Calculates CameraState.PositionOrientation to animate Camera with, given mapRectangle and camera states

Return

CameraState.PositionOrientation with calculated values to animate the camera

Parameters

mapRectangle

Rectangle with margins to be zoomed to

mapCenter

Wanted map center state

rotation

Wanted rotation state

tilt

Wanted tilt state

maxZoomLevel

Maximum zoom level allowed (ie. limits zoom in of the map)