MPICameraManager

class MPICameraManager

A camera controls manager.

This class encapsulates the methods that manipulate the camera.

Constructors

Link copied to clipboard
fun MPICameraManager()

Creates a MPICameraManager.

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
fun disableInteractions()

Disables user camera interactions.

Link copied to clipboard
fun enableInteractions()

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
fun setCameraInteractions(options: MPIOptions.CameraInteractionsSetOptions)

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.

Properties

Link copied to clipboard
var listener: MPICameraListener? = null

an instance of MPICameraListener

Link copied to clipboard
var position: MPIMap.MPICoordinate? = null
Link copied to clipboard
var rotation: Double = 0.0

the current camera rotation of MPIMapView.

Link copied to clipboard
var tilt: Double = 0.0

the current camera tilt of MPIMapView.

Link copied to clipboard
var zoom: Double = 0.0