VMAppleBaseMap

@objcMembers
public class VMAppleBaseMap : NSObject, VMBaseMapSyncable
extension VMAppleBaseMap: MKMapViewDelegate

Adapter that wraps an MKMapView to conform to VMBaseMapSyncable.

Usage:

let baseMap = MKMapView(frame: view.frame)
view.addSubview(baseMap)
venueMapView.baseMap = VMAppleBaseMap(mapView: baseMap)

The adapter takes over as the MKMapView’s delegate to observe accessibility-driven camera changes. If you need MKMapView delegate callbacks, set mkMapViewDelegate instead of assigning the delegate on the MKMapView directly.

Since

2.2.6
  • The wrapped MKMapView instance.

    Declaration

    Swift

    public let mapView: MKMapView
  • Forward MKMapViewDelegate calls to a consumer-provided delegate. Do not set mapView.delegate directly — it is owned by this adapter.

    Declaration

    Swift

    public weak var mkMapViewDelegate: MKMapViewDelegate?
  • Declaration

    Swift

    public var onCameraChange: (() -> Void)?
  • Declaration

    Swift

    public var maxZoom: Float { get }
  • Declaration

    Swift

    public var view: UIView { get }
  • Create an adapter wrapping an existing MKMapView.

    Declaration

    Swift

    public init(mapView: MKMapView)

    Parameters

    mapView

    The MKMapView to synchronize with the venue overlay.

  • Declaration

    Swift

    public func syncCamera(center: CLLocationCoordinate2D, altitude: Double, zoom: Float, heading: Double)
  • Declaration

    Swift

    public func cameraCenter() -> CLLocationCoordinate2D
  • Declaration

    Swift

    public func cameraAltitude() -> Double
  • Declaration

    Swift

    public func cameraHeading() -> Double
  • Declaration

    Swift

    public func configure()

MKMapViewDelegate

  • Declaration

    Swift

    @MainActor
    public func mapViewDidChangeVisibleRegion(_ mapView: MKMapView)
  • Declaration

    Swift

    @MainActor
    public func mapViewDidFinishLoadingMap(_ mapView: MKMapView)
  • Declaration

    Swift

    @MainActor
    public func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer
  • Declaration

    Swift

    @MainActor
    public func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView?