Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios Google Places API不返回当前在Google Now中显示的事件?_Ios_Json_Google Places Api - Fatal编程技术网

Ios Google Places API不返回当前在Google Now中显示的事件?

Ios Google Places API不返回当前在Google Now中显示的事件?,ios,json,google-places-api,Ios,Json,Google Places Api,Google Now事件信息不是来自返回结果中的Google Places API“events”吗?我正在获取结果,并将它们打印到地图视图中。我还有一个日志语句,以便查看所有结果。我看到了所有的位置,但其中一个位置没有显示任何事件,尽管在谷歌,我现在看到的是该位置的事件。如果有人能给我一些见解那就太好了。如果有帮助,则所有返回的结果中都不包含“事件”。这是我正在使用的URL: NSString *url = [NSString stringWithFormat:@"https://maps.g

Google Now事件信息不是来自返回结果中的Google Places API“events”吗?我正在获取结果,并将它们打印到地图视图中。我还有一个日志语句,以便查看所有结果。我看到了所有的位置,但其中一个位置没有显示任何事件,尽管在谷歌,我现在看到的是该位置的事件。如果有人能给我一些见解那就太好了。如果有帮助,则所有返回的结果中都不包含“事件”。这是我正在使用的URL:

NSString *url = [NSString stringWithFormat:@"https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=%f,%f&radius=5000&types=%@&sensor=true&num=100&key=%@", latitude, longitude, googleType, kGOOGLE_API_KEY];
我用键“results”将其解析到一个数组中,然后记录结果数组


返回的结果非常完美,只是没有任何事件。

您使用的是什么文档?我只能在API参考中看到
nearbysearch
,它没有
events
参数。结果数组中的每个结果可能包含以下字段:事件[]:数组或一个或多个元素提供有关此位置发生的当前事件的信息。每个位置最多返回三个事件,按开始时间排序。有关事件的信息,请阅读Places API中的事件。它没有您正在使用的任何API。请看,您使用的是
/search
,只有
/radarsearch
/textsearch和
/nearbysearch
。我更新了上面的url。我打错了。我正在使用nearbysearch。我仍然相信事件应该被返回,但也许我读错了