SWIFT 5
solution simple pour une utilisation à l'intérieur mapViewDidFinishLoadingMap :
func mapViewDidFinishLoadingMap(_ mapView: MKMapView) {
//center of USA, roughly. for example
let center = CLLocationCoordinate2D(latitude: 38.573936, longitude: -92.603760)
let latMeters = CLLocationDistance(10_000_000.00) //left and right pan
let longMeters = CLLocationDistance(5_000_000.00) //up and down pan
let coordinateRegion = MKCoordinateRegion(
center: center,
latitudinalMeters: latMeters,
longitudinalMeters: longMeters)
let cameraBoundary = MKMapView.CameraBoundary(coordinateRegion: coordinateRegion)
mapView.setCameraBoundary(cameraBoundary, animated: true)
}