func getPlaceDetails(_ placeId:String){
placesClient = GMSPlacesClient.shared()
placesClient?.lookUpPlaceID(placeId) { (place:GMSPlace?, error:Error?) in
guard error == nil else {
print("Place Id error \(error)")
return
}
// OperationQueue.main.addOperation {
self.placeArray.append(place!)
self.placeTableView.reloadData()
// }
}
}
错误
地点ID错误可选(错误域= com.google.places.ErrorDomain Code = -3" Places API库中发生内部错误。如果你 相信此错误代表一个错误,请使用提交报告 我们的社区和支持页面上的说明 (https://developers.google.com/places/support)&#34。 UserInfo = {NSLocalizedFailureReason =发生内部错误 Places API库。如果您认为此错误代表了错误,请 使用我们的社区和支持页面上的说明提交报告 (https://developers.google.com/places/support), NSUnderlyingError = 0x6080002588a0 {错误 Domain = com.google.places.server.ErrorDomain Code = -1"(null)" UserInfo = {NSUnderlyingError = 0x6080002515b0 {错误 Domain = com.google.GTLRErrorObjectDomain Code = 403"(Forbidden)" UserInfo = {error = Forbidden,GTLRStructuredError = GMSx_GTLRErrorObject 0x600000440090:{message:" Forbidden"错误:[1]代码:403}, NSLocalizedFailureReason =(禁止)}}}}})