calculateFromMapRectangle

open fun calculateFromMapRectangle(@NonNull mapRectangle: MapRectangle, @NonNull mapCenter: MapCenter, @FloatRange(from = "-180.0", to = 180.0) rotation: Float, tilt: Float, @FloatRange(from = 0.0, to = Float.MAX_VALUE) 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)

Throws


open fun calculateFromMapRectangle(@NonNull mapRectangle: MapRectangle, @NonNull mapCenter: MapCenter, @FloatRange(from = "-180.0", to = 180.0) rotation: Float, tilt: Float, @FloatRange(from = 0.0, to = Float.MAX_VALUE) maxZoomLevel: Float, @Nullable sourceState: CameraState): CameraState

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

Return

CameraState 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)

sourceState

Source camera state to get non-calculated parameters from