Hi,

      For this you need to use rjs Ajax request. Please refer the
following links, you will get an idea.

1. http://railscasts.com/episodes/43-ajax-with-rjs?autoplay=true,
2. http://railscasts.com/episodes/229-polling-for-changes?autoplay=true

On Thu, Dec 8, 2011 at 1:10 AM, skrite <[email protected]> wrote:
>
> Hey all,
> i have a google map and i am drawing circles on the map like this..
>
>
>  var latlng = new google.maps.LatLng(35.931387,
> -102.31062);
>    var myMapOptions =
> {
>      zoom:
> 12,
>      center:
> latlng,
>      mapTypeId:
> google.maps.MapTypeId.HYBRID
>    };
>
>    var map = new
> google.maps.Map(document.getElementById("map_canvas"),
> myMapOptions);
>    var infoWindow = new
> google.maps.InfoWindow();
>    var markerBounds = new
> google.maps.LatLngBounds();
>
>
>   <% @mapped_sites.each do |row|
> %>
>
>        // main
> circle
>        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]}"
> %>',
>          content: '<%= "some contnet
> %>'
>       });
>
>       markerArray.push(siteCircle);
>
> my question is, that since the fillColor is going to change from time
> to time, i want to update all the colors of the circles periodically.
> What i don't know how to do is get the equivelent to the
> @mapped_sites  because if i could, i think i could just delete the
> existing circles and draw new ones.
>
> How do i get info back from the server periodically to update the
> circle colors?
>
> thanks to all.
> skrite
>
>
>
> --
> 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 [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>



--

Regards,
L.KarthiKeyan.

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to