使用Google Maps API获取地点总数

时间:2016-01-05 12:11:38

标签: php jquery json google-maps google-maps-api-3

我想搜索支持的types支持的某些类别的地方,例如:获取美国博物馆的总数。

阅读完这些文档之后,我发现我们应该通过这种方式进行搜索。

https://maps.googleapis.com/maps/api/place/nearbysearch/output?parameters

即使它显示整个json ..

我试过这样的事情

https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJN1t_tDeuEmsRUsoyG83frY4&key=MYAPI

但我怎样才能准确地获得美国博物馆的总数。

1 个答案:

答案 0 :(得分:1)

无法向Places API查询Google数据库中指定半径范围内的地点总数。当您查询Places API时,将返回的最大结果数为20(二十),如此问题/答案中所述:What is the proper way to use the radius parameter in the Google Places API?.