Recommendations for the user's physical location (input, data type, display and verification)

I am creating a web application that requires users to provide their location (just like Facebook does). I am not sure of a better way to implement this. I need the ability to search for records of another object (call it "events"), which also have a physical location attached to it, and correspond to users in the same or fairly close location. I require permission only for individual cities.

The way I allow the user to provide my location (including checking and how I can allow this input), the way this field is stored in the database, etc., obviously, depends on each other. My real thinking is to allow free-form recording, store it as a text string and match it, breaking the location string into an array (separated by commas and period characters), and then comparing the user's location array with the event location array.

Is there a way so that I can make the problem easier for myself by checking somewhere the list of places provided by the web service? How do problems usually occur?

Any help would be greatly appreciated!

+5
source share
2

, .

(, , ) . - ( , Google , ), . IP, , , .

(, , ) , ..

API HTML5,

+2

, " ", ( ) , ( "--" , ).

http://www.geonames.org/ (, , ).

, , , , .

0

All Articles