I want our users of a web site to be able to
- either search and pick an address or mark a location on a map
- decide how accurate this address/location is
I am in the process of implementing the first part with jquery, jquery ui's autocomplete, google map, and google geocoder. For the second part I will generate a radiobutton list based on the address elements/alternatives of the first part on the client side with jquery.
My concern, however, is how to convey the choices to the server side. The Google geocoder includes a number of useful metadata that I want to store.
- A possibility is to store the complete json object in a hidden form field, but I can't trust the users. Such a solution would enable an unfriendly insertion of spam in the data.
- If the addresses/locations would have a unique identifyer I could store just these and let the server refetch/evaluate the data. The alternative geonames.org web service has such ids. But are for example the formatted addresses of a Google location unique?
Any tips?