# How to fetch fresh html for an Elabel map object

**URL:** <https://www.ruby-forum.com/t/how-to-fetch-fresh-html-for-an-elabel-map-object/195362>\
**Category:** Rails\
**Created:** [September 22, 2010, 8:00am UTC](https://www.ruby-forum.com/t/how-to-fetch-fresh-html-for-an-elabel-map-object/195362 "2010-09-22T08:00:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nephish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/8e7dd6/32.png) [@nephish](https://www.ruby-forum.com/u/nephish)\
**Post date:** [September 22, 2010, 8:00am UTC](https://www.ruby-forum.com/t/how-to-fetch-fresh-html-for-an-elabel-map-object/195362/1 "2010-09-22T08:00:13Z")

</div>

Hey all, i am working with google maps and a function in the Elabel  
that i am using to put data on a map.

In the docs for the Elabel, there is a function  
label.setContents(html) where html is what will go inside the  
Elable.

it looks like this:

var weather\_table\_one = new ELabel(new GLatLng(35.5,-102), \<%=  
@weather\_table\_html %\>, “style1”);  
map.addOverlay(weather\_table\_one);

what i need to do is update the data in the map every time the map  
moves ( with a listener ) and every 20 seconds or so.  
So i thought i would use a PeriodicalExecuter where the function is  
setContents(html) but i don’t know how to fetch that html

any tips would be greatly appreciated.

sk
