SwiftUI wrapper for MapKit's MKMapView (UIKit).
Add as a dependecy to your project using Swift Package Manager.
Embed map view in your SwiftUI view:
import SwiftUIMKMapView
struct ContentView: View {
var body: some View {
MapView(
visibleRect: /* Binding<MKMapRect> */,
annotations: /* [MKAnnotation] */,
annotationViewFactory: /* AnnotationViewFactory */,
overlays: /* [MKOverlay] */,
overlayRendererFactory: /* OverlayRendererFactory */
)
}
}
Check out the included example app.
Open SwiftUIMKMapView.xcworkspace
in Xcode (≥13.1) for development.
Use ExampleApp
scheme to build and run the example application.
Consider supporting further development and buy me a coffee.
Copyright © 2022 Dariusz Rybicki Darrarski
License: MIT