using google places api like airbnb
hi i'd like to make an input that can search for posts in which has address information.
i am using google places autocomplete api and they provide geometry location such latitude and longitude, or the id of the place..
which information should i save to my database?
when people search for a country, i want the website to show every single posts in that country but i don't know how if i save the id of the place or the latitude and longitude..
i also thought of radius with the location of the country but it doesn't necessarily guarantee that this would include every single element in that country
thanks in advance!
----------- edit ----------
now i understand i am only allowed to store the unique id i get.
when searched for a city, i can get the longitude and latitude by the id and i can find places around that point with specific radius
but the problem is when i search for a country. A country also has a unique id and i don't know how to list every single place in that country
any help on that?
链接地址: http://www.djcxy.com/p/63166.html