Hello, I''m using http://ym4r.rubyforge.org and I have a problem with removing existing marker. I tried this (.rjs file): [code] if @params[:gobject] == "on" @gobject_results.each {|marker| page << @map.addOverlay(marker)} else @gobject_results.each {|marker| page << @map.removeOverlay(marker)} end [/code] but it doesn''t work (I mean it only adds marks). I read on google maps API forums, that I need to have array of marks which was added, to remove them later. Please help me write this .js code in .rjs file: [code] var MarkersArray = []; // global var marker = new GMarker(PointsArray[Counter]); // Adding: map.addOverlay(marker); MarkersArray[Counter] = marker; // So I can remove a marker with: map.removeOverlay(MarkersArray[Counter]); [/code] Thank you in advance, Stan -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---