MTMapCameraHelper

public class MTMapCameraHelper

Sets combination of center, bearing and pitch, as well as roll and elevation.

  • The geographical centerpoint of the map.

    If center is not specified, SDK will look for it in the map style object. If it is not specified in the style, it will default to (latitude: 0.0, longitude: 0.0).

    Declaration

    Swift

    public var centerCoordinate: CLLocationCoordinate2D?
  • The bearing of the map, measured in degrees counter-clockwise from north.

    If bearing is not specified, SDK will look for it in the map style object. If it is not specified in the style, it will default to 0.0.

    Declaration

    Swift

    public var bearing: Double?
  • The pitch (tilt) of the map, measured in degrees away from the plane of the screen (0-85).

    If pitch is not specified, SDK will look for it in the map style object. If it is not specified in the style, it will default to 0.0.

    Declaration

    Swift

    public var pitch: Double?
  • The roll angle of the map, measured in degrees counter-clockwise about the camera boresight.

    If roll is not specified, SDK will look for it in the map style object. If it is not specified in the style, it will default to 0.0.

    Declaration

    Swift

    public var roll: Double?
  • The elevation of the geographical centerpoint of the map, in meters above sea level.

    If elevation is not specified, SDK will look for it in the map style object. If it is not specified in the style, it will default to 0.0.

    Declaration

    Swift

    public var elevation: Double?
  • Returns camera object with all properties set to 0.

    Declaration

    Swift

    public static func getCamera() -> MTMapCameraHelper
  • Returns camera object initialized from map style options.

    If any of the properties is not set within the style, it will default to 0.

    Declaration

    Swift

    public static func getCameraFromMapStyle() -> MTMapCameraHelper
  • Returns camera object constructed from given options object.

    Declaration

    Swift

    public static func getCameraWith(_ options: MTMapOptions) -> MTMapCameraHelper

    Parameters

    options

    MTMapOptions object with initial camera options.

  • Returns camera object with the given center coordinate, bearing, pitch, roll and elevation.

    Declaration

    Swift

    public static func cameraLookingAtCenterCoordinate(
        _ centerCoordinate: CLLocationCoordinate2D,
        bearing: Double,
        pitch: Double,
        roll: Double,
        elevation: Double
    ) -> MTMapCameraHelper

    Parameters

    centerCoordinate

    Latitude and longitude pair.

    bearing

    Bearing of the map, measured in degrees counter-clockwise from north.

    pitch

    Pitch of the map, measured in degrees away from the plane of the screen (0-85).

    roll

    Roll angle of the map, measured in degrees counter-clockwise about the camera boresight.

    elevation

    Elevation of the initial geographical centerpoint of the map, in meters above sea level.

  • Returns camera object with the given center coordinate, bearing and pitch.

    Looks for roll and elevation in the map’s style object. If they are not specified in the style, they will default to 0.

    Declaration

    Swift

    public static func cameraLookingAtCenterCoordinate(
        _ centerCoordinate: CLLocationCoordinate2D,
        bearing: Double,
        pitch: Double
    ) -> MTMapCameraHelper

    Parameters

    centerCoordinate

    Latitude and longitude pair.

    bearing

    Bearing of the map, measured in degrees counter-clockwise from north.

    pitch

    Pitch of the map, measured in degrees away from the plane of the screen (0-85).

  • Returns boolean inidicating whether camera object is equal to the reciever.

    Declaration

    Swift

    public func isEqualToMapCameraHelper(_ camera: MTMapCameraHelper) -> Bool

    Parameters

    camera

    MTMapCamera object to compare with.