Skip to content
RxMKMapView is a RxSwift wrapper for MKMapView `delegate`.
Branch: master
Clone or download
Latest commit c0fc44a Feb 12, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
Example
RxMKMapView.xcodeproj
RxMKMapView.xcworkspace Add workspace for the framework Jun 25, 2018
RxMKMapView Test for carthage Nov 12, 2016
Sources Support rendering of the MKOverlay class (#42) Feb 12, 2019
scripts
.gitignore
Cartfile
Cartfile.resolved Update to version 4.4 Feb 12, 2019
LICENSE
README.md Update to version 4.4 Feb 12, 2019
RxMKMapView.podspec

README.md

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 4.0 and RxSwift (4.4).

License

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

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.