[Geomoose-users] Refresh Layers Automatically

Jay Kapalczynski jkapalczynski at ci.maple-grove.mn.us
Mon Nov 17 11:07:11 EST 2008


Anyone with any thoughts on why I cant even get to the StartListening Function in the StartListening.js page from this call?

<service name="refreshLayers2" title="Refresh Layer every 5 Seconds" type="internal" default="true" locked="true" command="Events.triggerEvent('StartListening', 'DO I NEED SOMETHING HERE')" icon="shared/images/toolbar/MapleGrove_Buttons/Reload.jpg" highlight="shared/images/toolbar/MapleGrove_Buttons/Pictometry.jpg"/>

Thanks....


From: Jay Kapalczynski
Sent: Wednesday, November 12, 2008 11:09 AM
To: geomoose-developers at lists.sourceforge.net; geomoose-users at lists.sourceforge.net
Subject: RE: [Geomoose-users] Refresh Layers Automatically

Have been talking with Duck and this is where I am right now....thought maybe someone else out there might have a few thoughts....

I created two buttons....one that will start refreshing a layer every couple seconds, one that will stop the refreshing.
I created two js pages that will handle the code

Am I on the right path here?  Right now I cant even get to the Start_Listening.js page, so I know I am not doing something correct.


Demo.xml makes the calls to the js pages.
Js pages do the work....just not sure how to call the refreshlayer from js page


This works currently but I need it to repeat and refresh every few seconds

<service name="refreshLayers2" title="Refresh Layer" type="internal" default="true" locked="true" command="Events.triggerEvent('refreshlayer', 'Database')" icon="shared/images/toolbar/MapleGrove_Buttons/Reload.jpg" highlight="shared/images/toolbar/MapleGrove_Buttons/Pictometry.jpg"/>


THanks

3 FILES:

MapleGrove.demo.xml

<service name="refreshLayers2" title="Refresh Layer every 5 Seconds" type="internal" default="true" locked="true" command="Events.triggerEvent('StartListening', 'DO I NEED SOMETHING HERE')" icon="shared/images/toolbar/MapleGrove_Buttons/Reload.jpg" highlight="shared/images/toolbar/MapleGrove_Buttons/Pictometry.jpg"/>

<service name="refreshLayers3" title="Stop the refreshing" type="internal" default="true" locked="true" command="Events.triggerEvent('StopListening ', 'DO I NEED SOMETHING HERE')" icon="shared/images/toolbar/MapleGrove_Buttons/Reload.jpg" highlight="shared/images/toolbar/MapleGrove_Buttons/Pictometry.jpg"/>


StartListening.js

StartListening();
setInterval("setIntervalNow()", 5000);
function setIntervalNow()
{
// Call the  Events.triggerEvent('refreshlayer', 'Parcels');

alert('Hello');
}


Stop Listening.js

StopListening();
clearInterval("clearIntervalNow ()", 5000);
function clearIntervalNow ()
{
// clearInterval

                alert('Hello');
}



From: Dan Little [mailto:danlittle at yahoo.com]
Sent: Tuesday, November 11, 2008 9:25 AM
To: Jay Kapalczynski
Subject: Re: [Geomoose-users] Refresh Layers

Do a google search on setTimeout and setInterval, they aren't built-in to GeoMOOSE, they're native JS functions.

________________________________
From: Jay Kapalczynski <jkapalczynski at ci.maple-grove.mn.us>
To: Dan Little <danlittle at yahoo.com>
Sent: Monday, November 10, 2008 3:02:38 PM
Subject: RE: [Geomoose-users] Refresh Layers
I did a search in all the .js files, the main config, demos, and menu files and cant find a ...  function setTimeout ()

Any thoughts as to where they are?

I suppose then I can just call the function and run the refresh code against the settimeout and set interval code (somehow)

Will cross that bridge when I get to it.  For now just cant seem to find the functions....

VERY APPRECITED duck....

From: Dan Little [mailto:danlittle at yahoo.com]
Sent: Monday, November 10, 2008 2:44 PM
To: Jay Kapalczynski; geomoose-developers at lists.sourceforge.net; geomoose-users at lists.sourceforge.net
Subject: Re: [Geomoose-users] Refresh Layers

Jay,

You'll need to look into setTimeout or setInterval Javascript functions.  You'll then need to write a couple of wrapper functions and attach that to two different buttons (easy to do with a service).

________________________________
From: Jay Kapalczynski <jkapalczynski at ci.maple-grove.mn.us>
To: Dan Little <danlittle at yahoo.com>; "geomoose-developers at lists.sourceforge.net" <geomoose-developers at lists.sourceforge.net>; "geomoose-users at lists.sourceforge.net" <geomoose-users at lists.sourceforge.net>
Sent: Monday, November 10, 2008 2:28:16 PM
Subject: RE: [Geomoose-users] Refresh Layers
That works great....but I am trying to do something else.  Hoping you can point me in the correct direction.

Was trying to get my hands on the code and modify it in another file.  I want to click a button in the tool bar and it runs the refresh on a particular layer every 10 seconds (or some other specified time value)

So I would need a loop to run then stop when the another button was clicked.

Any thoughts?



From: Dan Little [mailto:danlittle at yahoo.com]
Sent: Monday, November 10, 2008 2:16 PM
To: Jay Kapalczynski; geomoose-developers at lists.sourceforge.net; geomoose-users at lists.sourceforge.net
Subject: Re: [Geomoose-users] Refresh Layers

Example:
One Layer - Events.triggerEvent('refreshlayer', 'Parcels');
All Layers - Events.triggerEvent('refreshlayers', '');

________________________________
From: Jay Kapalczynski <jkapalczynski at ci.maple-grove.mn.us>
To: "geomoose-developers at lists.sourceforge.net" <geomoose-developers at lists.sourceforge.net>; "geomoose-users at lists.sourceforge.net" <geomoose-users at lists.sourceforge.net>
Sent: Monday, November 10, 2008 2:09:48 PM
Subject: [Geomoose-users] Refresh Layers
Where is the function that refreshes the layers?

Anyone out there know how I could configure the code the refresh a specific layer?

Thanks






-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geomoose-users/attachments/20081117/4c72abec/attachment.html


More information about the Geomoose-users mailing list