MapCameraLimits
public class MapCameraLimits
extension MapCameraLimits: NativeBase
extension MapCameraLimits: Hashable
Controls constraints on map camera parameters.
When constraints are set, they are enforced for current camera state and for all future changes to the camera.
When setting, limits are applied on next rendering loop.
-
Absolute minimum possible value of tilt angle.
Declaration
Swift
public static let minTilt: Double -
Absolute maximum possible value of tilt angle.
Declaration
Swift
public static let maxTilt: Double -
Absolute minimum possible value of zoom level.
Declaration
Swift
public static let minZoomLevel: Double -
Absolute maximum possible value of zoom level.
Declaration
Swift
public static let maxZoomLevel: Double -
The tilt range that can be applied to the camera. The supported values fall inside
code>range. Setting values outside the supported range will be ignored.By default, a
code>tilt range is set during initialization.If the current camera tilt exceeds the new limit range, it will immediately be set to minimum or maximum, depending on which is closest.
Declaration
Swift
public var tiltRange: AngleRange { get set } -
The bearing range within which the camera can be rotated. If the current camera bearing exceeds the limit range, it will immediately be set to minimum or maximum, depending on which is closest.
By default, a full circle is set during initialization.
Declaration
Swift
public var bearingRange: AngleRange { get set } -
The zoom range that can be applied to the camera. The supported values fall inside
code>range. Values outside the supported zoom range are ignored.By default, a
code>zoom range is set during initialization.If the current camera zoom exceeds the limit range, it will immediately be set to minimum or maximum, depending on which is closest.
Declaration
Swift
public var zoomRange: MapMeasureRange { get set } -
Geographical area to which the camera target is limited. Absence of a value means that there is no limit.
Declaration
Swift
public var targetArea: GeoBox? { get set } -
Sets the bearing range within which the camera can rotate at a given zoom.
The resulting camera bearing at a zoom is an interpolated value of the ranges set for closest matching zoom values. When no bearing range is specified for
MapCameraLimits.minZoomLevel, the bearing range set throughMapCameraLimits.bearingRangeis used for interpolation.Zoom values outside the supported zoom range are ignored. By default, the maximum bearing range for all zoom values is set during initialization.
Declaration
Swift
public func setBearingRangeAtZoom(_ zoom: MapMeasure, bearingRange: AngleRange)Parameters
zoomZoom at which the range is set.
bearingRangeBearing range.
-
Clears bearing ranges for all zoom values and resets
MapCameraLimits.bearingRangeto default.Declaration
Swift
public func clearBearingRanges() -
Sets tilt ranges that can be set on the camera at given zoom.
The resulting camera tilt at a zoom is an interpolated value of the ranges set for closest matching zoom values. When no tilt range is specified for
MapCameraLimits.minZoomLevel, the tilt range set throughMapCameraLimits.tiltRangeis used for interpolation.Zoom or tilt values outside the supported zoom and tilt range are ignored. By default, the maximum tilt range for all zoom values is set during initialization.
Declaration
Swift
public func setTiltRangeAtZoom(_ zoom: MapMeasure, tiltRange: AngleRange)Parameters
zoomZoom at which the range is set.
tiltRangeTilt range.
-
Clears tilt ranges for all zoom values and resets
MapCameraLimits.tiltRangeto default.Declaration
Swift
public func clearTiltRanges()