如何获取存储到某个 Google Maps Place ID 的所有信息?

How to get all information stored to a certain Google Maps Place ID?

我了解到,如果我使用特定关键字搜索 Google 地图,我会找到似乎符合我输入的关键字的地点 ID。现在我想知道是否有可能将所有信息存储到某个 Google 地图地点 ID,例如 ChIJk5rNr3KuEmsRwWgFX9zzBaQ。最好采用 JSON 格式。

Google 地图 API v3 可以吗?

编辑:我发现通过执行此请求可以获得特定信息列表的可能性

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=cruise&key=YOUR_API_KEY

但是肯定没有列出所有的信息。

如果您正在使用 Google Places API 本身,您的文档参考是 here。示例:

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

如果您正在使用 Google Maps JS API 的 PlacesService,请检查 these docs(部分 "Demos and sample code",选项卡 "PLACE DETAILS")。示例:

var service = new google.maps.places.PlacesService(map);
var request = {
    placeId: PLACE_ID
};
service.getDetails(request, function (place, status) {
    if (status == google.maps.places.PlacesServiceStatus.OK) {
      console.log(place);
    }
});