【问题标题】:Trouble to get near by ATM list无法通过 ATM 清单靠近
【发布时间】:2013-12-20 05:19:13
【问题描述】:

我正在使用 Google Map API 通过 ATM 获取附近的纬度和经度。我通过我的 Google 凭据获得了 Google API 密钥。我通过我的应用程序请求代码

NSString *url = [NSString stringWithFormat:@"https://maps.googleapis.com/maps/api/place/search     /json?location=%f,%f&radius=%@&types=%@&sensor=true&key=%@", currentCentre.latitude, currentCentre.longitude, [NSString stringWithFormat:@"%i", currenDist], googleType, kGOOGLE_API_KEY];
NSURL *googleRequestURL=[NSURL URLWithString:url];
NSData* data = [NSData dataWithContentsOfURL: googleRequestURL];
NSDictionary* json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&error];

我得到了

{
    "debug_info" =     (
    );
    "html_attributions" =     (
    );
    results =     (
    );
    status = "REQUEST_DENIED";
} as response.

请告诉我该怎么做??

【问题讨论】:

  • 首先删除网址中不必要的空格。
  • 我的代码中没有空格,这些只出现在这里...我也收到了响应...但状态是“REQUEST_DENIED”,但我有 API 密钥并且已经启用将 API 和 Google MAP 放在 API 访问部分..
  • 你能发布你的最终网址吗?

标签: ios objective-c google-maps


【解决方案1】:

我认为您需要使用 Google Place API 来获取 ATM 位置查找下面的链接

How to get 20+ result from Google Places API?

【讨论】:

  • 我用同样的方式。我正在使用 API 密钥使请求格式正确。我已启用我的 Google 凭据所需的所有访问权限,但未获得 status = "REQUEST_DENIED" 作为响应。
猜你喜欢
  • 2014-03-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-06-18
  • 2020-11-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多