Google Map Latitude and Longitude values in form

Take a look at this I did for a client:

http://lpoc.co.uk/properties-for-sale/

A user can click the map and choose where to search. When a user clicks it updates a couple of hidden fields. Feel free to look at the source code to see how its done. If you want a more in depth description of the google maps api and javascript then this question would be better asked on stackoverflow