Reputation: 21
I am using Google Map Place Search API. Our application has a feature to link a piece of information to a place (the object object from google).
Now, I use to google place object ID to link with my information.
My problem is that: How to get back the information of the place by giving the object ID given from google. Is there any API provided by Google to read the object from the ID. (
I know there is a place reference, it is good to use to identify the place. The docs says that reference may be invalid for a certain situation.
{
"geometry": {
"location": {
"lat": 38.8852706,
"lng": -77.0470548
},
"viewport": {
"northeast": {
"lat": 38.8929246,
"lng": -77.0325958
},
"southwest": {
"lat": 38.8793284,
"lng": -77.05594750000002
}
}
},
"icon": "http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png",
"id": "da2a7421dfa5aa6389e20647cdbb8e88a2504c05",
"name": "West Potomac Park",
"reference": "CoQBfAAAADkSnsucxvVcYVq_vC5xH0S18B-poMsy6OZBnudVoXq26wUkjxhX7vzWbD9sv11qfPs4LW3Y3-EXPbC9kwaolEYlQnwvv7G-eKXJQMeD_wKLEbY1ZfP-67eznjUkyIj2AdNwydRhpKE19pMxvS6ZjAajS9l8VCPkcG7kLu5x0LCfEhCGqMmf8yAzv22_46-DHWuqGhT0CYr1f5HqfCn7V1ZVlOc-Lyd1aQ",
"types": [
"park",
"establishment"
],
"vicinity": "Washington"
}
Upvotes: 1
Views: 363
Reputation: 21
Recently, Google Map API unified the identify of place using a property called "placeID", which is not same as "id" and "reference";
Note: The id and reference fields are deprecated as of June 24, 2014. They are replaced by the new place ID, a textual identifier that uniquely identifies a place and can be used to retrieve information about the place. The Places API currently returns a place_id in all responses, and accepts a placeid in the Place Details request or place_id in the Place Delete request. 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.
Reference: https://developers.google.com/places/documentation/search
Upvotes: 1