Topic: how to use javascript to refresh circles on a google map?

hey all,
i have a google map that i am drawing circles on, and cannot seem to
find out how to refresh the circles every few minutes.

<% @mapped_sites.each do |row| %>

    center = new google.maps.LatLng(<%= "#{row[0]}" %>, <%=
"#{row[1]}"
%>);
       siteCircle =
makeMarker({
         position:
center,
         strokeColor:
"#FF0000",
         strokeOpacity:
0.8,
         strokeWeight:
2,
         fillColor: '<%= "#{row[7]}"
%>',
         fillOpacity:
0.75,
         radius:
560,
         map:
map,
         center:
center,
         radius: <%= "#{row[2]}"
%>,
         title: '<%= "#{row[5]}"
%>'

      });

      markerArray.push(siteCircle);


i know i can remove the markers by their index in the markerArray, but
i don't know how to redraw them or adjust their parameters with ruby
and javascript. I am sure it involves a remote call,

how can i mark them again?
i mean, how can i go and re-create the  <% @mapped_sites.each do |row|
%>       ?
can i do it with a partial?

thanks for any tips on this.

Last edited by skrite (2011-12-07 23:25:40)

Re: how to use javascript to refresh circles on a google map?

wow, having looked at the previous post, it looks terrible.
i used pastie http://pastie.org/2984001