How do I determine a location in the Google Maps API, with an ID or link?

With autocomplete places, I can get the same place with different names (mostly Bound change). I save space in my DB. I need to locate where the name was entered. Two values ​​are candidates: id

and reference

. But, according to the documentation, both values ​​can change!

https://developers.google.com/maps/documentation/javascript/places?hl=en#place_details_responses

How can I determine the location?

+3


source to share


1 answer


Yes, both can change, but the refId will point to the same place as well. For some reason, you may have many reps in one place. Just tired of id.



Link

contains a token that can be used to query the information service in the future. This token may be different from the reference used in the request for the Details service. We recommend that you regularly update your saved links for places. While this token uniquely identifies Place, the opposite is not true: there may be many valid reference tokens on Place

-1


source







All Articles