How to store and update the unique ID for a place?

280 views
Skip to first unread message

Mapper

unread,
Nov 3, 2011, 7:47:59 PM11/3/11
to google-map...@googlegroups.com
I am working on a project where I want to store "places" of the users and find people who did go to the same "place". I do not need to store any other info than the Place ID in my local database. I send the users to google maps for any info about that they further require about that place.

It is said in the documentation of the Places API that the unique identifier for a place may change and we should use the reference token to query and update our local cache.

google.maps.places.PlaceResult (http://code.google.com/apis/maps/documentation/javascript/reference.html#PlaceResult)
"id - string - A unique identifier denoting this Place. This identifier may not be used to retrieve information about this Place, and to verify the identity of a Place across separate searches. As ids can occasionally change, it is recommended that the stored id for a Place be compared with the id returned in later Details requests for the same Place, and updated if necessary." 

Problem:

What will happen if a user cheks in a place lets say with ID 10000 
and after that the ID of the place changes to 15000 
Another user checks in at the same place but I will have two different IDs for the same place in my DB

Should I run a query to check every place one by one to see if the ID have changed?
If so how often I should do that?





Martin Brehme

unread,
Dec 8, 2011, 7:50:01 AM12/8/11
to google-map...@googlegroups.com
Did you solve this problem? I have nearly exact the same issue? It would help to know how often the id is updated by google...!?

Marcelo

unread,
Dec 8, 2011, 6:10:57 PM12/8/11
to Google Maps JavaScript API v3
The Places API has its own forum, here:
http://code.google.com/apis/maps/documentation/places/forum.html

--
Marcelo - http://maps.forum.nu
--


On Nov 3, 4:47 pm, Mapper <gonene...@gmail.com> wrote:
> I am working on a project where I want to store "places" of the users and
> find people who did go to the same "place". I do not need to store any
> other info than the Place ID in my local database. I send the users to
> google maps for any info about that they further require about that place.
>
> It is said in the documentation of the Places API that the unique
> identifier for a place may change and we should use the reference token to
> query and update our local cache.
>

> *google.maps.places.PlaceResult **(*http://code.google.com/apis/maps/documentation/javascript/reference.h...
> *)*
> *"id - string - A unique identifier denoting this Place. This identifier


> may not be used to retrieve information about this Place, and to verify the
> identity of a Place across separate searches. As ids can occasionally
> change, it is recommended that the stored id for a Place be compared with
> the id returned in later Details requests for the same Place, and updated

> if necessary." *
> *
> *
> *Problem:*

Reply all
Reply to author
Forward
0 new messages