MPICameraManager

A camera controls manager.

This class encapsulates the methods that manipulate the camera.

Constructors

Link copied to clipboard
constructor()

Creates a MPICameraManager.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

the current camera rotation of MPIMapView.

Link copied to clipboard

the current camera tilt of MPIMapView.

Link copied to clipboard

Functions

Link copied to clipboard
fun animate(    config: MPIOptions.CameraTransformCoordinate,     options: MPIOptions.CameraAnimation? = null,     callback: (error: MPIError?) -> Unit? = null)

Animate the Camera's view to smoothly transition to a new state over time, using a coordinate.

fun animate(config: MPIOptions.CameraTransformNode, options: MPIOptions.CameraAnimation? = null, callback: (error: MPIError?) -> Unit? = null)

Animate the Camera's view to smoothly transition to a new state over time, using a node.

Link copied to clipboard

Disables user camera interactions.

Link copied to clipboard

Enables user camera interactions.

Link copied to clipboard
fun focusOn(targets: MPIOptions.CameraTargets, options: MPIOptions.FocusOn? = null, callback: (error: MPIError?) -> Unit? = null)

Focus the Camera view on a collection of targets and animate to that state.

Link copied to clipboard
fun set(positionOptions: MPIOptions.CameraTransformCoordinate, callback: (error: MPIError?) -> Unit? = null)

Set the Camera's view to a new state using a coordinate.

fun set(positionOptions: MPIOptions.CameraTransformNode, callback: (error: MPIError?) -> Unit? = null)

Set the Camera's view to a new state using a node.

Link copied to clipboard

Enable or disable the ability for the user to interact with the camera (e.g. pan, zoom, tilt, etc). This does not affect programmatic camera controls, such as set and focusOn.

Link copied to clipboard
fun setMaxTilt(tiltAngle: Double, callback: (MPIError?) -> Unit?)

Sets the maximum tilt of MPIMapView, in radians

Link copied to clipboard
fun setMaxZoom(zoomLevel: Double)

Sets the maximum zoom level of MPIMapView

Link copied to clipboard
fun setMinZoom(zoomLevel: Double)

Sets the minimum zoom level of MPIMapView

Link copied to clipboard
suspend fun setRotation(rotation: Double): Double
fun setRotation(rotation: Double, callback: (MPIError?) -> Unit?)

Sets the current camera rotation of MPIMapView

Link copied to clipboard
suspend fun setTilt(tilt: Double): Double
fun setTilt(tilt: Double, callback: (MPIError?) -> Unit?)

Sets the current camera tilt of MPIMapView

Link copied to clipboard
suspend fun setZoom(zoom: Double): Double
fun setZoom(zoom: Double, callback: (MPIError?) -> Unit? = null)

Sets the current zoom level of MPIMapView

Link copied to clipboard
fun translate(    direction: MPIOptions.CAMERA_DIRECTION,     distance: Double,     options: MPIOptions.CameraAnimation? = null,     callback: (error: MPIError?) -> Unit? = null)

Moves the Camera view in a relative direction by a given distance in meters.