我们可以使用 google 地点 api 只获取我附近的酒店详细信息吗

Can we get only hotels details near me using google place api

我是 google 地图和地点 API.I 的新手,想获取有关使用 google 地点 API 的酒店的唯一信息。

在开始使用 Google Places API 之前,您必须向您的应用程序添加 Google API 键。检查 here the steps on how to get a key for your app. Once you have an API key, you can add it to your app's manifest as described in this guide.

使用 Google Places API Web 服务,它允许您查询各种类别的地点信息,例如酒店。您可以按邻近度或文本字符串搜索地点。 A Place Search returns a list of places along with summary information about each place; additional information is available via a Place Details query. You can also create a marker for each hotel found and if the user clicks a hotel marker, it will show the details of that hotel in an info window.

这是一个 example,它允许用户在给定国家/地区的给定地点查找所有酒店。然后显示所有返回酒店的标记,以及每家酒店的点击详细信息。