Does Google ever remove a place from it's API or re-use the placeId? [closed]

╄→гoц情女王★ 提交于 2019-12-06 09:03:51

问题


In Google Places, each place has a specific placeId. We store this placeId and use it to retrieve information about the place as needed. For this approach to work, we need to confirm:

  1. Is each placeId unique?
  2. Does Google ever re-use a placeId?
  3. Does Google ever delete a place from it's places database?
  4. If they don't delete a place, do they just mark it as "permanently_closed"?

Thanks in advance for any/all help!


回答1:


  1. Yes, each place has a unique ID.

  2. No google do not re-use IDs. For each place in this world google have unique id for it.

  3. Depends. Here, what google says,

A place can only be deleted if: 1. It was added by the same application as is requesting its deletion. 2. It has not successfully passed through the Google Maps moderation process, and is therefore visible only to the application that added it.

  1. "INVALID_REQUEST" is what you get if you search for a place that has been deleted

Also for more info, here is a small notice from Google:

Note: The id and reference fields are deprecated as of June 24, 2014. They are replaced by the new place ID, a unique identifier that can be used to compare places and to retrieve information about a place. The Places API currently returns a place_id in all responses, and accepts a placeid in the Place Details and Place Delete requests. Soon after June 24, 2015, the API will stop returning the id and reference fields in responses. Some time later, the API will no longer accept the reference in requests. We recommend that you update your code to use the new place ID instead of id and reference as soon as possible.

I hope I answered your questions, for more help, kindly comment, I'll reply. Reference:

https://developers.google.com/places/documentation/search



来源:https://stackoverflow.com/questions/23871128/does-google-ever-remove-a-place-from-its-api-or-re-use-the-placeid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!