3

我即将创建一个使用 Google Places Api 的应用程序。

只要我理解这些术语,就不允许在我的数据库中存储地点数据,例如名称、纬度、经度或详细信息。那正确吗 ?

我发现允许“缓存”数据而不是存储它。

为了在我的网站上显示“最后使用的地点”,我需要存储一些东西(例如地点的参考 ID)。

我可以在我的数据库中存储有关某个地点的哪些信息?

提前致谢!

4

3 回答 3

0

您可以从 google 地方响应中存储 place_id。如果您想对这些数据进行一些操作,您可以将 place_id 与 user_id 一起存储在本地表中。例如,如果您想从谷歌回复中喜欢任何餐厅:

user_id: 1,
place_id: "xyz",
isLiked: true

您可以在本地数据库中进行上述设计。您可以从此表中获取“place_id”并从 google places api 获取完整的餐厅数据。

于 2021-07-20T14:19:39.760 回答
0

您只能将地点 ID 存储在数据库中。每次要显示数据时都必须请求其他所有内容。

于 2020-10-15T19:17:25.973 回答
-1

据我了解,您可以存储 APi 中的所有内容:

(b) No Pre-Fetching, Caching, or Storage of Content. You must not pre-fetch, cache, or store any Content, except that you may store: (i) limited amounts of Content for the purpose of improving the performance of your Maps API Implementation if you do so temporarily (and in no event for more than 30 calendar days), securely, and in a manner that does not permit use of the Content outside of the Service; and (ii) any content identifier or key that the Maps APIs Documentation specifically permits you to store. For example, you must not use the Content to create an independent database of "places" or other local listings information.

但您不能存储用户数据,除非得到同意:

(i) Your Maps API Implementation must notify the user in advance of the type(s) of data that you intend to collect from the user or the user's device. Your Maps API Implementation must not obtain or cache any user's location in any manner except with the user's prior consent. Your Maps API Implementation must let the user revoke the user's consent at any time.

参考谷歌地点条款(是的,它与谷歌地图相同)

看这两个链接:

于 2013-03-12T20:24:15.800 回答