Начиная с iSO 13, этот код возвращает черное изображение. Любая идея?
Я также записываю в журнал эти предупреждения:
InfoLog FlyoverNightShader: WARNING: 0:29: Overflow in implicit constant conversion, minimum range for lowp float is (-2,2)
WARNING: 0:31: Overflow in implicit constant conversion, minimum range for lowp float is (-2,2)
let mapSnapshotOptions = MKMapSnapshotter.Options()
mapSnapshotOptions.mapType = .satelliteFlyover
let location = CLLocationCoordinate2D(latitude: lat, longitude: long)
let span = MKCoordinateSpan(latitudeDelta: 10, longitudeDelta: 10)
let region = MKCoordinateRegion(center: location, span: span)
mapSnapshotOptions.region = region
let snapShotter = MKMapSnapshotter(options: mapSnapshotOptions)
snapShotter.start { [weak self] (snapshot, error)in
if let image = snapshot?.image {
main {
self?.mapImageView.image = image
self?.mapActivityIndicator.stopAnimating()
}
}
}