0
こんにちは私は迅速に3まで誰もが知っているこの機能を修正しようとしていますか?ユーザーの位置がすぐに見つかると現在の位置が地図に表示されます3
override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
if !didFindMyLocation {
let myLocation: CLLocation = change?[NSKeyValueChangeKey] as! CLLocation //Getting an error here Cannot convert value of type '(NSKeyValueChangeKey).Type' (aka 'NSKeyValueChangeKey.Type') to expected argument type 'DictionaryIndex<_, _>'
viewMap.camera = GMSCameraPosition.camera(withTarget: myLocation.coordinate, zoom: 10.0)
viewMap.settings.myLocationButton = true
didFindMyLocation = false
}
}