MPICameraManager

public class MPICameraManager

Camara manager

  • Get current camera rotation of MPIMapView

    Declaration

    Swift

    public internal(set) var rotation: Double { get }
  • Get current camera tilt of MPIMapView

    Declaration

    Swift

    public internal(set) var tilt: Double { get }
  • Get current camera zoom of MPIMapView

    Declaration

    Swift

    public internal(set) var zoom: Double { get }
  • Get current camera position of MPIMapView

    Declaration

    Swift

    public var position: MPIMap.MPICoordinate? { get }
  • Sets the maximum tilt angle (in radians) the camera is allowed to use.

    Tilt angle must be between 0 and π/2 radians. It will be clamped within this range if it exceeds it on either end.

    As tilt angle approaches π/2 radians, this will impact overall touch controls and should be used sparingly.

    Declaration

    Swift

    public func setMaxTilt(tiltAngle: Double, callback: ((String?, String?) -> Void)? = nil) throws

    Parameters

    tiltAngle

    title angle in Radians

    callback

    Callback when max tilt has been set

    Return Value

    Void

  • Sets the camera to a new transform configuration.

    Declaration

    Swift

    public func set(cameraTransform: MPIOptions.CameraConfiguration, callback: ((String?, String?) -> Void)? = nil)

    Parameters

    cameraTransform

    camera transform

    callback

    Callback when camera configuration has been set

    Return Value

    Void

  • Animate the camera to a new transform configuration.

    Declaration

    Swift

    public func animate(cameraTransform: MPIOptions.CameraConfiguration, options: MPIOptions.CameraAnimation? = nil, callback: ((String?, String?) -> Void)? = nil)

    Parameters

    cameraTransform

    camera transform

    options

    camera transform options

    callback

    Callback when camera configuration has been set

    Return Value

    Void

  • Focus the camera on to a set of targets with specific transforms

    Declaration

    Swift

    public func focusOn(targets: MPIOptions.CameraTargets, options: MPIOptions.FocusOnOptions? = nil, callback: ((String?, String?) -> Void)? = nil)

    Parameters

    targets

    targets to focus on

    options

    focus options

    callback

    Callback when camera configuration has been set

    Return Value

    Void

  • Translate Camera in one of four directions

    Declaration

    Swift

    public func translate(direction: MPIOptions.CAMERA_DIRECTION, distance: Double, options: MPIOptions.CameraAnimation? = nil, callback: ((String?, String?) -> Void)? = nil)

    Parameters

    direction

    direction of translation

    distance

    translation distance in meters

    options

    camera animation options

    callback

    Callback when camera configuration has been set

    Return Value

    Void

  • Sets maximum zoom of venue in meters

    Declaration

    Swift

    public func setMaxZoom(zoomLevel: Double, callback: ((String?, String?) -> Void)? = nil)

    Parameters

    zoomLevel

    zoom level

    callback

    Callback when camera configuration has been set

    Return Value

    Void

  • Sets minimum zoom of venue in meters

    Declaration

    Swift

    public func setMinZoom(zoomLevel: Double, callback: ((String?, String?) -> Void)? = nil)

    Parameters

    callback

    Callback when camera configuration has been set

    Return Value

    Void