YM4R GM Javascript events?

Hi all,

I have added a GEvent to a google map with a JS calback and it works
fine, but I do need to get some way of returning the values to rails,
so I can add the new marker to an array.

For that, I need some kind of listener, call a ruby function,
something like that.

The code is as follows:

def index
   @map = GMap.new("map_div")
   @map.control_init(:large_map => true)
   @map.center_zoom_init ([ 59.91106, 10.72223],16)
   @map.overlay_init(GMarker.new([59.91122, 10.72217], :title =>

     if (overlay)
       map.addOverlay(new GMarker(point));


Thanks in advance,