Google Places API - 我可以存储哪些数据?

时间:2013-03-12 09:10:08

标签: google-places-api google-places

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

只要我理解这些术语,就不允许将数据存储在我的数据库中 喜欢名称,纬度,经度或细节信息。是对的吗 ?

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

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

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

提前感谢!

3 个答案:

答案 0 :(得分: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.

引自google places terms(是的,它与谷歌地图相同)

请参阅以下两个链接:

答案 1 :(得分:0)

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

答案 2 :(得分:0)

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

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

您可以在本地数据库中像上面一样设计。您可以从该表中获取“place_id”并从谷歌地点 api 获取完整的餐厅数据。

相关问题