I have just started using the Google Maps API, it's for a service I have on my site; basically when a user is adding a post they have an option of setting a location using the google maps API, I have created the Google maps API key and connected it, I have also added the draggable marker and a location search box. So it is fully function at the moment.
The only thing that I can't get my head around is how to record the longitude and latitude into two hidden inputs with javascript:
<input type="hidden" id="mk-longitude" value="//marker longitude value" />
<input type="hidden" id="mk-latitude" value="//marker latitude value" />
So, it should, using Javascript record the markers longitude and latitude on change inside these two inputs and then on submit they would get submitted to the database.