Swift - Show Empty map view with error message iOS

Hello everybody,

I am building a Map and I am using a map view that I want to be always present in the interface. However, the user can share to show its location or not.

The Map view requires a region. But I want to show an empty map view with just the grid on with a message.

Do you know if it is possible to achieve that? Thank you!

Code Block
let span = MKCoordinateSpan(latitudeDelta: CLLOcationDegrees, longitudeDelta: CLLOcationDegrees)
let region = MKCoordinateRegion(center: observationCoordinates, span: span)
let annotation = MKPointAnnotation()
annotation.coordinate = observationCoordinates
uiView.setRegion(region, animated: true)
uiView.addAnnotation(annotation)

MKMapView will always show a map unless the network is unavailable.
MKMapView can't show an "empty" map, but you could temporarily hide the map view, using:

mapView.isHidden = true
Swift - Show Empty map view with error message iOS
 
 
Q