CameraOptionsFactory
public enum CameraOptionsFactory
Camera options factory.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Adds an update that adjusts the scale by the specified value, i.e. a scale of 1:100 with a zoomBy of 2 becomes 1:200, a scale of 1:200 with a zoomBy of 0.25 becomes 1:50. If the resulting scale would be less than 1 after the update is applied, the scale is set to 1. Returns a CameraOptions instance that adjusts the scale by the specified value, i.e. a scale of 1:100 with a value of 2 becomes 1:200, a scale of 1:200 with a value of 0.25 becomes 1:50. If the resulting scale would be less than 1 after the update is applied, the scale is set to 1.
Declaration
Swift
public static func zoomBy(_ value: Double) -> CameraOptions
Parameters
value
Zoom value.
Return Value
a CameraOptions instance that adjusts the scale by the specified value.
-
Declaration
Swift
public static func zoomIn() -> CameraOptions
Return Value
a CameraOptions instance that adds an update reducing the scale by one step.
-
Declaration
Swift
public static func zoomOut() -> CameraOptions
Return Value
a CameraOptions instance that adds an update increasing the scale by one step.
-
Returns a CameraOptions instance that adjusts the tilt by the specified angle. The tilt is measured from the nadir, i.e. value of 0 indicates the camera is looking straight down, and 90 means it is looking straight ahead towards the horizon. To ensure that the map is readable, the value may be clamped to a maximum value determined based on camera scale.
Declaration
Swift
public static func tiltBy(_ value: Double) -> CameraOptions
Parameters
value
A tilt adjustment to be applied, in degrees.
Return Value
a CameraOptions instance that adjusts the tilt by the specified angle.
-
Returns a CameraOptions instance that adjusts the heading by the specified angle. Heading is measured starting at due north and continuing clockwise around the compass. Thus, north is 0 degrees, east is 90 degrees, south is 180 degrees, and so on.
Declaration
Swift
public static func rotateBy(_ value: Double) -> CameraOptions
Parameters
value
Heading change to be applied, in degrees.
Return Value
A CameraOptions instance that adjusts the heading by the specified angle.
-
Returns a CameraOptions instance that adjusts the camera position by the coordinate vector.
Declaration
Swift
public static func moveBy(_ value: CGPoint) -> CameraOptions
Parameters
value
A coordinate vector.
Return Value
A CameraOptions instance that adjusts the camera position by the coordinate vector.
-
Returns a CameraOptions instance that transforms the camera to ensure that all coordinates are visible and padded.
Declaration
Swift
public static func fitToCoordinates(_ coordinates: [CLLocationCoordinate2D], padding: UInt = 0) -> CameraOptions
Parameters
coordinates
List of coordinates to be taken into account when setting the camera position.
padding
Padding between the coordinates and camera borders.
Return Value
A CameraOptions instance that transforms the camera to ensure that all coordinates are visible and padded.