BaseMapView

open class BaseMapView : UIView, MapClient, MBMMetalViewProvider, CameraViewDelegate
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)?
  • The map’s current camera

    Declaration

    Swift

    public var camera: CameraOptions { get set }
  • The map’s current center coordinate.

    Declaration

    Swift

    public var centerCoordinate: CLLocationCoordinate2D { get set }
  • The map’s zoom level.

    Declaration

    Swift

    public var zoom: CGFloat { get set }
  • The map’s bearing, measured clockwise from 0° north.

    Declaration

    Swift

    public var bearing: CLLocationDirection { get set }
  • The map’s pitch, falling within a range of 0 to 60.

    Declaration

    Swift

    public var pitch: CGFloat { get set }
  • The map’s camera padding

    Declaration

    Swift

    public var padding: UIEdgeInsets { get set }
  • Declaration

    Swift

    public var anchor: CGPoint { get set }
  • 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)
  • 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 the MapView.

    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 the MapView.

    Return Value

    A CGPoint relative to the UIView.

  • 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 resulting CGRect will be relative to. Omitting this value assumes the resulting CGRect will be expressed relative to the MapView.

    Return Value

    A CGRect whose corners represent the vertices of a set of CoordinateBounds.

  • Undocumented

    Declaration

    Swift

    public var observable: Observable? { get }
  • Undocumented

    See more

    Declaration

    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>