I use angular client and express/mongodb server for my website. I need to implement a location picker.
Here is a demo.
http://plnkr.co/edit/a3KlK8dKH3wwiiksDSn2?p=preview
I need to store users address in my database. I dont want to store the entire complex object as it would be very tedious. (see the screenshot)
I need to be able to suggest friends nearby, same street, or same city, same state etc.
If i store the formatted_address
, it's easy to save, but hard to get the relationship between 2 places. e.g. 2 user may enter the following 2 addresses.
Santa Monica, CA, USA
California, USA
So what information should I save?