I'm new to google maps API and need directions.
I want to let a user navigate a map (embedded in my page) and when she clicks, I want to capture the location and save it somehow.
I'm using rails 3 and have been l开发者_StackOverflow社区ooking for a gem or plugin, but only thing I found was YM4R/GM that's apparently using an old GM api and only works with rails 2...
If the answer is RTFM the Google-maps api v3, I apologize ;-)
Like this :
google.maps.event.addListener(map, 'click', function(event) {
    alert(event.latLng.lat());
    alert(event.latLng.lng());
});
Google code playground gathers a bunch a code samples related to Google API. Moreover, it provides a embedded IDE which allow to easily try out some code on the fly.
This piece of code should help you in retrieving the clicked location.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论