Tag: google places api

Google API关键问题

我正在开发一个应用程序,我需要从Google Places API中查询地点,并将最近的地方保存到用户的Google帐户(他们通过GIDSignINlogin到应用程序)。 Places API在控制台中被激活,并且它们的关键字是正确的,但是,URL可能有问题,并且我不断收到此错误… 可选([“error_message”:该IP,站点或移动应用程序无权使用此API密钥。从IP地址2607:f598:b349:fd01:94f8:7386:d82c:1b29收到的请求,为空引用者, “:(),”status“:REQUEST_DENIED,”html_attributions“:()]) 被调用来查询API的方法,当前经纬度来自位置pipe理器(工作正常) func saveCurrentLocation() { //API CALL let latString = String(currentLat) let longString = String(currentLong) let apiString = NSString(format: "https://maps.googleapis.com/maps/api/place/search/json?location=%f,%f&radius=500&types=food&sensor=true&key=AIzaSyDH0jNx1WJw0pkCzbc0xaHumDoDAYYWvtk", latString, longString) let url = NSURL(string: apiString as String) let session = NSURLSession.sharedSession() let dataTask = session.dataTaskWithURL(url!) { (data, response, error) -> Void in if let urlContent = data […]

GooglePlacesSDK返回错误500

我从谷歌地方得到一个错误: { "error": { "errors": [{ "domain": "global", "reason": "backendError", "message": "Backend Error" }], "code": 500, "message": "Backend Error" } } 我正在使用Google Places API for iOS 2.0.0 。 错误看起来很奇怪。 有没有经验的人帮我摆脱这个错误?

iOS谷歌地方的API – 编译错误 – 使用未声明的标识符GMSAutocompleteViewController

我已经使用CocoaPods安装了GoogleMaps SDK。 对于某些屏幕,我需要使用Google Places API 这是代码 GMSAutocompleteViewController * acController = [[GMSAutocompleteViewController alloc] init]; acController.delegate = self; [self presentViewController:acController animated:YES completion:nil]; 我从https://developers.google.com/places/ios-api/autocomplete获得了这些信息 错误 – 使用未声明的标识符'GMSAutocompleteViewController'

错误使用未parsing的标识符GMSPlacePickerConfig&GooglePlacePicker? (Google Places 2.0)

错误使用未parsing的标识符GMSPlacePickerConfig&GooglePlacePicker? (Google Places 2.0) import GoogleMaps import GooglePlaces 已经被宣布在顶部。 这里

此IP,网站或移动应用程序未被授权使用此API密钥。 如何解决这个问题的iOS应用程序?

我正在研究增强现实在iOS应用程序。 我从这个网站find了一个很好的教程和一个示例项目。 在我的设备中运行该应用程序时,我收到了NSLOG控制台中的错误, Response: { "error_message" = "This IP, site or mobile application is not authorized to use this API key."; "html_attributions" = ( ); results = ( ); status = "REQUEST_DENIED"; } 我在Google开发站点创build了一个新的项目,并创build了Sever Key,因为Google的Api API 不支持iOS Key 。 我也试过浏览器的关键,它没有工作。 我的请求url如下所示, <NSMutableURLRequest https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=12.974760,80.225061&radius=1000&key=AIzaXXXXXXXXXXXXXXXXXXXMQ&sensor=true> 尝试了一些在这里提出的解决scheme ,但没有运气。 任何build议将不胜感激。

iOS Google Places API:“此IP,网站或移动应用程序未被授权使用此API密钥”

我正在iOS 7应用上testingGoogle Places API。 当我向API发送一个请求时,我得到一个json结果,并显示以下错误消息: This IP, site or mobile application is not authorized to use this API key. 为了构build请求,我去了Google API控制台,并根据我的应用程序包生成了我的iOS API密钥。 我没有使用Google地图或应用中的其他任何内容,只是试图向Places API发送请求。 有什么我失踪? PS:我复制了我正在使用的URL,并将API密钥更改为浏览器客户端密钥,并在Chrome中进行了testing,并且工作完美。

如何获得国家特定的结果与谷歌自动完成的地方api ios sdk?

我使用下面的方法来获取GMSPlacesClient类的inputstring的自动完成结果: – (void)autocompleteQuery:(NSString *)query bounds:(GMSCoordinateBounds * GMS_NULLABLE_PTR)bounds filter:(GMSAutocompleteFilter * GMS_NULLABLE_PTR)filter callback:(GMSAutocompletePredictionsCallback)callback 我试图通过多种方式来实现边界,但没有一个工作,我不知道是否有任何标准的方法来获得与GMSCoordinateBounds国家特定的结果?