// Check for map errors and if there are none change the web map renderer
private func mapDidLoad(_ map: AGSMap) {
if let error = map.loadError {
let errorMessage = error.localizedDescription
// Create a new alert and present it to the user
let errorAlert = UIAlertController(title: "Attention", message: errorMessage, preferredStyle: .alert)
self.present(errorAlert, animated: true, completion: nil)
} else {
// If there are no errors, change the renderer style of the feature layers
changeFeatureLayerRenderers(for: map)
}
}