         guard let text = self.searchController.searchBar.text,
             !text.trimmingCharacters(in: CharacterSet.whitespaces).characters.isEmpty
             else { return }
+        // TODO: Debounce.
         self.searchMapItems(withQuery: text)
     }
 

    open func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        guard tableView === self.resultsViewController.tableView else { return }

        let mapItem = self.resultsViewController.mapItems[indexPath.row]
        self.selectedMapItem = mapItem

        self.resultsViewController.dismiss(animated: true) {

            if let location = mapItem.placemark.location {
                self.zoom(to: location, animated: false)
            }

            if let annotation = self.findMatchingMapViewAnnotation(for: mapItem.placemark) {
                // zoom calls setRegion, which seems to take until the next run loop, and if
                // we don't wait until it's fully done, it may reset the annotation selection.
                DispatchQueue.main.async {
                    self.mapView.selectAnnotation(annotation, animated: false)
                }
            }

        }
    }

}

     Main search handler that makes a `MKLocalSearchRequest` and updates
     `resultsViewController`.

     See [Apple docs](https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/LocationAwarenessPG/EnablingSearch/EnablingSearch.html).
     */
    fileprivate func searchMapItems(withQuery query: String) {
