         
     }
     
+    private func loadStores() {
+        
+        UserLocation.instance.requestLocation() { coordinate in
+            self.loadStoresInMapView(at: coordinate)
+        }
+        
+    }
+    
     private func prepareMapView() {
         
         mapView.delegate = self

        self.mapView.setRegion(region, animated: true)
    }
    
    func populateStoreAnnotations() {
        
        for store in storesInMapView {
            
            let storeName = store.storeName
            let address = store.address.allValues
            let location = store.location
            
            let latitude = location.latitude
            let longitude = location.longitude
            
            let annotation = MKPointAnnotation()
            
            annotation.coordinate.latitude = latitude
            annotation.coordinate.longitude = longitude
            
            annotation.title = storeName
            mapView.addAnnotations([annotation])

        }
        
    }
    
    func loadStoresInMapView(at coordinate: CLLocationCoordinate2D) {
        
        UIApplication.shared.isNetworkActivityIndicatorVisible = true
        
        let distanceInMeters = DistanceCalculation.milesToMeters(miles: Double(distance))
        
        SearchStores.searchForStoresLocations(near: coordinate, with: distanceInMeters) { stores in
            
            self.storesInMapView = stores
            
            self.populateStoreAnnotations()
            
            UIApplication.shared.isNetworkActivityIndicatorVisible = false
            
        }
        
    }

}


extension StoresMapViewController {
    
    func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? {

    
    typealias Callback = ([StoresInfo]) -> ()
    
    fileprivate let async: OperationQueue = {
        
        let operationQueue = OperationQueue()
        operationQueue.maxConcurrentOperationCount = 10
