Get lng and lat from Google maps

Hi

I am trying to have a google map where the user can click on the map
and choose a location. After that, I need to save the lng and lat
chosen by the user from the map into the database using rails. What
would be the best way to approach that?

Use event_id method

@map.event_init(@map, :click,
“function(marker,point) { alert(point);
}”)

point will give u lat long information.

For information about google maps in rails:
http://blog.brijeshshah.com/google-maps-in-ruby-on-rails/

Thanks
Brijesh S.