Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes isn't appearing #163

Open
dfmarulanda opened this issue Jan 22, 2019 · 3 comments
Open

Sometimes isn't appearing #163

dfmarulanda opened this issue Jan 22, 2019 · 3 comments

Comments

@dfmarulanda
Copy link

Sometimes when i'm doing a request, the SearchTextField doesn't appear even if there are items inside it.

 searchView.rx.text.orEmpty
      .debounce(0.5, scheduler: MainScheduler.instance)
      .distinctUntilChanged()
      .filterEmpty()
      .map { [unowned self] text in
        self.searchView.showLoadingIndicator()
        let request = MKLocalSearch.Request()
        request.naturalLanguageQuery = text
        request.region = self.mapView.region
        return request
      }
      .flatMapLatest{ MKLocalSearch(request:$0).rx.start() }
      .map { $0.mapItems }
      .filterEmpty()
      .asDriver(onErrorJustReturn: [])
      .drive( onNext:{ location in
        self.searchView.filterStrings(location.compactMap { $0.placemark.title } )
        self.searchView.stopLoadingIndicator()
        self.searchView.layoutIfNeeded()
      }).disposed(by:disposeBag)```
@dfmarulanda
Copy link
Author

It seems that the response of my request doesn't match with the exact value of the word i entered into the textView.

@dfmarulanda
Copy link
Author

@apasccon I see that you're not actively maintaining this repo; if you need help I can keep it updated.

@apasccon
Copy link
Owner

apasccon commented Jan 23, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants