     //MARK: Cancel Button Code
     @IBAction func cancelButtonTapped(_ sender: UIBarButtonItem) {
         
+        self.delegate?.didSelectFilters(self, farmersMarkets: self.showFarmersMarkets, groceryStores: self.showGroceryStores)
         self.dismiss(animated: true, completion: nil)
         
     }
-    
-    
     
     //MARK: Filter Buttons Code
     @IBAction func onFarmersMarkets(_ sender: UIButton) {


protocol FilterDelegate {
    
    func didSelectFilters(_ : FilterViewController, farmersMarkets: Bool, groceryStores: Bool, coordinate: CLLocationCoordinate2D)
    
}


    var delegate: FilterDelegate?
    var distance = 0.0
    
    var stores: [Store] = []
    fileprivate var selectedPin: MKPlacemark?
    fileprivate let blackNectarPin = UIImage(named: "BlackNectarMapPin")
    
