swift
1func locationManager(manager: CLLocationManager, didUpdateToLocation newLocation: CLLocation, fromLocation oldLocation: CLLocation) { 2 3 x_coordinate = newLocation.coordinate.latitude 4 y_coordinate = newLocation.coordinate.longitude 5 6 location?.stopUpdatingLocation() 7 8 let camera = GMSCameraPosition.cameraWithLatitude(x_coordinate, longitude: y_coordinate, zoom: 10) 9 let mapView = GMSMapView.mapWithFrame(CGRectZero, camera: camera) 10 11 let marker = GMSMarker() 12 marker.position = CLLocationCoordinate2DMake(x_coordinate, y_coordinate) 13 marker.title = "hoge" 14 marker.snippet = "hoge" 15 marker.map = mapView 16 17 self.view = mapView 18 }
以上のようなコードで実行したところ、エラーになってしまい、
CoreData: warning: Unable to load class named 'GMSCachedObject' for entity 'GMSCachedObject'. Class not found, using default NSManagedObject instead.
このようなエラーコードでした。
どの行で落ちたのか調べてみたところ、どうやら let mapView = GMSMapView.mapWithFrame(CGRectZero, camera: camera)の行で落ちているようです。
どうしたらいいでしょうか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。