将地图更改为混合天桥或卫星天桥并从故事板中启用3D视图
从viewDidLoad updateMapToShowGlobe调用此函数(location:mapView.centerCoordinate)
// MARK: Snippet to show full globe in 3d view
private func updateMapToShowGlobe(location :CLLocationCoordinate2D) {
let span = MKCoordinateSpanMake(130, 130)
let region = MKCoordinateRegionMake(location, span)
if( region.center.latitude > -90 && region.center.latitude < 90 && region.center.longitude > -180 && region.center.longitude < 180 ){
mapView.setRegion(region, animated: true)
}
}
这很悲伤,因为下面有错误的信息。 至少在2018年11月的iOS 12中,这很容易做到。
这就是你需要做的全球视图。
或
mapView.mapType = .satelliteFlyover
要么
mapView.mapType = .hybridFlyover
(我不确定,它没有技术基础,但感觉就像.hybridFlyover在我的经验中表现出更好的表现)
尽管如此:p ;; 我确保它有效,因为我之前做过。
希望对你有帮助。