How to get map widget for location selection with Location / GMap
Have you checked out the Geolocation Field Module? It works with the Google Maps Api v3 and does exactly what you are trying to do. You add the map as a field/widget within your content-type. The Field stores lat/lon values.