Swiftpack.co - RxSwiftCommunity/RxMKMapView as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by RxSwiftCommunity.
RxSwiftCommunity/RxMKMapView 6.0.1
RxMKMapView is a RxSwift wrapper for MKMapView `delegate`.
⭐️ 122
🕓 2 weeks ago
iOS
.package(url: "https://github.com/RxSwiftCommunity/RxMKMapView.git", from: "6.0.1")

RxMKMapView

RxMKMapView is a RxSwift wrapper for MKMapView (MapKit) delegate providing a Reactive Delegate Proxy as well as a bindable annotations interface to dynamically change the "data source" of your map.

CircleCI Version License Platform Carthage compatible

Installation

CocoaPods

RxMKMapView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "RxMKMapView"

Carthage

Add this to Cartfile

github "RxSwiftCommunity/RxMKMapView"

Example Usages

// MARK: Setup MKMapView

let mapView = MKMapView(frame: view.frame)
view.addSubview(mapView)

// MARK: Bind Annotations

requestForAnnotations() // Observable<[MyMapAnnotation]>
    .asDriver(onErrorJustReturn: [])
    .drive(mapView.rx.annotations)
    .disposed(by: disposeBag)

// MARK: Respond to Loading Events

mapView.rx.willStartLoadingMap
       .asDriver()
       .drive(onNext: {
           print("map started loadedloading")
       })
       .disposed(by: disposeBag)

mapView.rx.didFinishLoadingMap
       .asDriver()
       .drive(onNext: {
           print("map finished loading")
       })
       .disposed(by: disposeBag)

Requirements

RxMKMapView requires Swift 5 and RxSwift 6.0. For the last RxSwift 5.x support, please use RxMKMapView 5.1.0.

License

RxMKMapView is available under the MIT license. See the LICENSE file for more info.

GitHub

link
Stars: 122
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

RxMKMapView 6.0.1
2 weeks ago

Fixes a compilation issue in Xcode 14 caused by https://github.com/apple/swift/issues/45652. Thanks @mikelrob

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics