1
我使用Google Map API获取ATM附近的纬度和经度。我通过Google凭据获取Google API密钥。我通过我的应用程序代码麻烦靠近ATM列表
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中启用了位置API和Google MAP访问部分.. – user3121532
你可以发布你的最终网址吗? –