RxSwiftCommunity/RxMKMapView

Name: RxMKMapView

Owner: RxSwift Community

Description: RxMKMapView is a RxSwift wrapper for MKMapView `delegate`.

Created: 2016-01-04 16:21:50.0

Updated: 2018-04-05 13:41:19.0

Pushed: 2018-03-23 11:39:07.0

Homepage:

Size: 917

Language: Swift

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

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:

"RxMKMapView"
Carthage

Add this to Cartfile

ub "RxSwiftCommunity/RxMKMapView"
Example Usages
ARK: Setup MKMapView

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

ARK: Bind Annotations

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

ARK: Respond to Loading Events

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

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

RxMKMapView requires Swift 4.0 and RxSwift (4.0).

License

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


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.