I\'m trying to zoom a map into the user\'s current location once the view loads, but I\'m getting the error \"** * Terminating app due to uncaught exception \'NSInvalidA
Swift 3 version Use this method to zoom into any coordinate.
extension MKMapView{
func zoomIn(coordinate: CLLocationCoordinate2D, withLevel level:CLLocationDistance = 10000){
let camera =
MKMapCamera(lookingAtCenter: coordinate, fromEyeCoordinate: coordinate, eyeAltitude: level)
self.setCamera(camera, animated: true)
}
}