The "old school" solution for this was a clickable image as a form
element.
<input name="coord" type="image" src="map.png">
That gives you two parameters coord.x and coord.y measured in pixels.
And it worked even back in the days before javascript, for example in the
Xerox PARC Map Viewer.
A Javascript solution would be: When either the map is clicked or the Marker is moved, copy
the location to two (possibly hidden) fields long + lat in your form.
I'd recommend using leaflet, not google maps. Here's an example with leaflet:
http://leafletjs.com/examples/quick-start.html#dealing-with-events