-
Undocumented
Declaration
Swift
public private(set) var mapboxMap: MapboxMap! { get set }
-
The
gestures
object will be responsible for all gestures on the map.Declaration
Swift
public internal(set) var gestures: GestureManager! { get }
-
The
ornaments
object will be responsible for all ornaments on the map.Declaration
Swift
public internal(set) var ornaments: OrnamentsManager! { get }
-
The
camera
object manages a camera’s view lifecycle.Declaration
Swift
public internal(set) var camera: CameraAnimationsManager! { get }
-
The
location
object handles location events of the map.Declaration
Swift
public internal(set) var location: LocationManager! { get }
-
Controls the addition/removal of annotations to the map.
Declaration
Swift
public internal(set) var annotations: AnnotationOrchestrator! { get }
-
Manages the configuration of custom view annotations on the map.
Declaration
Swift
public internal(set) var viewAnnotations: ViewAnnotationManager! { get }
-
A Boolean value that indicates whether the underlying
CAMetalLayer
of theMapView
presents its content using a CoreAnimation transactionBy default, this is
false
resulting in the output of a rendering pass being displayed on theCAMetalLayer
as quickly as possible (and asynchronously). This typically results in the fastest rendering performance.If, however, the
MapView
is overlaid with aUIKit
element which must be pinned to a particular lat-long, then setting this totrue
will result in better synchronization and less jitter.Declaration
Swift
public var presentsWithTransaction: Bool { get set }
-
The preferred frames per second used for map rendering. NOTE:
MapView.preferredFrameRateRange
is available for iOS 15.0 and above.Declaration
Swift
@available(iOS, deprecated: 1000000) public var preferredFramesPerSecond: Int { get set }
-
The
timestamp
from the underlyingCADisplayLink
if it exists, otherwisenil
Declaration
Swift
@_spi(Metrics) public var displayLinkTimestamp: CFTimeInterval? { get }
-
The
duration
from the underlyingCADisplayLink
if it exists, otherwisenil
Declaration
Swift
@_spi(Metrics) public var displayLinkDuration: CFTimeInterval? { get }
-
The map’s current camera
Declaration
Swift
public var cameraState: CameraState { get }
-
The map’s current anchor, calculated after applying padding (if it exists)
Declaration
Swift
public var anchor: CGPoint { get }
-
Initialize a MapView
Declaration
Swift
public init(frame: CGRect, mapInitOptions: MapInitOptions = MapInitOptions())
Parameters
frame
frame for the MapView.
mapInitOptions
MapInitOptions
; default usesResourceOptionsManager.default
to retrieve a shared default resource option, including the access token. -
Undocumented
Declaration
Swift
required public init?(coder: NSCoder)
-
Undocumented
Declaration
Swift
open override func awakeFromNib()
-
Undocumented
Declaration
Swift
public override func layoutSubviews()
-
Undocumented
Declaration
Swift
open override func willMove(toWindow newWindow: UIWindow?)
-
Undocumented
Declaration
Swift
open override func didMoveToWindow()
-
Undocumented
Declaration
Swift
open override func didMoveToSuperview()
-
Errors related to rendered snapshots
See moreDeclaration
Swift
@_spi(Experimental) public enum SnapshotError : Error
-
Synchronously captures the rendered map as a
UIImage
. The image does not include the ornaments (scale bar, compass, attribution, etc.) or any other custom subviews. UsedrawHierarchy(in:afterScreenUpdates:)
directly to include the full hierarchy.Declaration
Swift
@_spi(Experimental) public func snapshot() throws -> UIImage
Return Value
A
UIImage
of the rendered map