BaseMapView
open class BaseMapView : UIView, MapClient, MBMMetalViewProvider
extension BaseMapView: AnnotationSupportableMap
Undocumented
-
The underlying renderer object responsible for rendering the map
Declaration
Swift
public var __map: Map!
-
Undocumented
Declaration
Swift
public var needsDisplayRefresh: Bool
-
Undocumented
Declaration
Swift
public var dormant: Bool
-
Undocumented
Declaration
Swift
public var displayCallback: (() -> Void)?
-
Returns the camera view managed by this object.
Declaration
Swift
public var cameraView: CameraView!
-
Undocumented
Declaration
Swift
public var preferredFPS: PreferredFPS { get set }
-
The map’s current center coordinate.
Declaration
Swift
public var centerCoordinate: CLLocationCoordinate2D { get }
-
The map’s current zoom level.
Declaration
Swift
public var zoom: CGFloat { get }
-
The map’s current bearing, measured clockwise from 0° north.
Declaration
Swift
public var bearing: CLLocationDirection { get }
-
The map’s current pitch, falling within a range of 0 to 60.
Declaration
Swift
public var pitch: CGFloat { get }
-
Undocumented
Declaration
Swift
public init(with frame: CGRect, resourceOptions: ResourceOptions, glyphsRasterizationOptions: GlyphsRasterizationOptions, styleURL: URL?)
-
Undocumented
Declaration
Swift
open override func awakeFromNib()
-
Undocumented
Declaration
Swift
public func on(_ eventType: MapEvents.EventKind, handler: @escaping (MapboxCoreMaps.Event) -> Void)
-
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()
-
Undocumented
Declaration
Swift
required public init?(coder: NSCoder)
-
Undocumented
Declaration
Swift
public func scheduleRepaint()
-
Undocumented
Declaration
Swift
public var peer: MBXPeerWrapper?
-
Undocumented
Declaration
Swift
public func getMetalView(for metalDevice: MTLDevice?) -> MTKView?
-
Converts a point in a given view’s coordinate system to a geographic coordinate.
Declaration
Swift
public func coordinate(for point: CGPoint, in view: UIView? = nil) -> CLLocationCoordinate2D
Parameters
point
The point to convert.
view
An optional view the
point
is relative to. Omitting this value assumes the point is relative to theMapView
.Return Value
A CLLocationCoordinate that represents the geographic location of the point.
-
Converts a map coordinate to a
CGPoint
, relative to the map view.Declaration
Swift
public func point(for coordinate: CLLocationCoordinate2D, in view: UIView? = nil) -> CGPoint
Parameters
coordinate
The coordinate to convert.
view
An optional view the resulting point will be relative to. Omitting this value assumes resulting
CGPoint
will be expressed relative to theMapView
.Return Value
A
CGPoint
relative to theUIView
. -
Transforms a view’s frame into a set of coordinate bounds.
Declaration
Swift
public func coordinateBounds(for view: UIView) -> CoordinateBounds
Parameters
view
The
UIView
whose bounds will be transformed into a set of map coordinate bounds.Return Value
A
CoordinateBounds
object that represents the southwest and northeast corners of the view’s bounds. -
Transforms a set of map coordinate bounds to a
CGRect
.Declaration
Swift
public func rect(for coordinateBounds: CoordinateBounds, in view: UIView? = nil) -> CGRect
Parameters
view
An optional
UIView
whose coordinate space the resultingCGRect
will be relative to. Omitting this value assumes the resultingCGRect
will be expressed relative to theMapView
.Return Value
A
CGRect
whose corners represent the vertices of a set ofCoordinateBounds
. -
Undocumented
Declaration
Swift
public var observable: Observable? { get }
-
Undocumented
See moreDeclaration
Swift
public enum QueryRenderedFeaturesError : Error
-
Asynchronous query for a list of rendered map features that intersect with the given rect.
Declaration
Swift
public func visibleFeatures(in rect: CGRect, styleLayers: Set<String>? = nil, filter: Expression? = nil, completion: @escaping (Result<[Feature], QueryRenderedFeaturesError>) -> Void)
Parameters
rect
The rect at which we should query for features
styleLayers
An optional set of style layer identifiers to query for. If not specified, the query will search for features in all layers belonging to the map’s style.
filter
An optional expression to use in order to filter features from the result.
completion
A closure that receives and operates on
Result<[Feature], QueryRenderedFeaturesError>
-
Asynchronous query for a list of rendered map features that intersect with the given point.
Declaration
Swift
public func visibleFeatures(at point: CGPoint, styleLayers: Set<String>? = nil, filter: Expression? = nil, completion: @escaping (Result<[Feature], QueryRenderedFeaturesError>) -> Void)
Parameters
point
The point at which we should query for features
styleLayers
An optional set of style layer identifiers to query for. If not specified, the query will search for features in all layers belonging to the map’s style.
filter
An optional expression to use in order to filter features from the result.
completion
A closure that receives and operates on
Result<[Feature], QueryRenderedFeaturesError>