我正在尝试在我的应用程序中的视图中设置地图,但遇到了这个问题:
CoreData: 注释:无法加载路径为'/ var / containers / Bundle / Application / 35C61A40-48B9-40E0-A6F9-AB7492A15009 / simply-convertor.app / GoogleMaps.bundle / GMSCacheStorage.momd / Storage.omo'的优化模型 CoreData: 注释:无法加载路径为'/ var / containers / Bundle / Application / 35C61A40-48B9-40E0-A6F9-AB7492A15009 / simply-convertor.app / GoogleMaps.bundle / GMSCacheStorage.momd / Storage.omo'的优化模型 CoreData: 注释:无法加载路径为'/ var / containers / Bundle / Application / 35C61A40-48B9-40E0-A6F9-AB7492A15009 / simply-convertor.app / GoogleMaps.bundle / GMSCacheStorage.momd / Storage.omo'的优化模型
我向我的ViewContoroller添加了一个空视图并将其类型更改为GMSMapView。 在viewDidLoad方法中,我从位置创建一个新地图并初始化主要的mapView:
什么是问题?
CoreData: 注释:无法加载路径为'/ var / containers / Bundle / Application / 35C61A40-48B9-40E0-A6F9-AB7492A15009 / simply-convertor.app / GoogleMaps.bundle / GMSCacheStorage.momd / Storage.omo'的优化模型 CoreData: 注释:无法加载路径为'/ var / containers / Bundle / Application / 35C61A40-48B9-40E0-A6F9-AB7492A15009 / simply-convertor.app / GoogleMaps.bundle / GMSCacheStorage.momd / Storage.omo'的优化模型 CoreData: 注释:无法加载路径为'/ var / containers / Bundle / Application / 35C61A40-48B9-40E0-A6F9-AB7492A15009 / simply-convertor.app / GoogleMaps.bundle / GMSCacheStorage.momd / Storage.omo'的优化模型
我向我的ViewContoroller添加了一个空视图并将其类型更改为GMSMapView。 在viewDidLoad方法中,我从位置创建一个新地图并初始化主要的mapView:
override func viewDidLoad() {
super.viewDidLoad()
placesClient = GMSPlacesClient.shared()
locationManager.delegate = self
locationManager.desiredAccuracy = kCLLocationAccuracyBest
locationManager.requestWhenInUseAuthorization()
locationManager.startMonitoringSignificantLocationChanges()
locationAuthStatus()
print(location.coordinate.latitude, location.coordinate.longitude)
let camera = GMSCameraPosition.camera(withLatitude: 31.9650070083707, longitude: 34.7899029677496, zoom: 6.0)
let map = GMSMapView.map(withFrame: CGRect.zero, camera: camera)
self.mapView = map
// Creates a marker in the center of the map.
let marker = GMSMarker()
marker.position = CLLocationCoordinate2D(latitude: 31.9650070083707, longitude: 34.7899029677496)
marker.title = "Home"
marker.snippet = "Home"
marker.map = mapView
}
什么是问题?