     }
     
     @IBAction func showLocations() {
-        
+        let region = regionForAnnotations(locations)
+        mapView.setRegion(region, animated: true)
     }
 
     func updateLocations() {

        locations = foundObjects as [Location]
        mapView.addAnnotations(locations)
    }
}

extension MapViewController: MKMapViewDelegate {
    
}

    override func viewDidLoad() {
        super.viewDidLoad()
        updateLocations()
        
        if !locations.isEmpty {
            showLocations()
        }
    }
    
    @IBAction func showUser() {
