Hi Everyone,

Thanks for the quick replies. Much appreciated. 

To be clear, my primary question is about efficiency. Optimally, I would like 
OpenLayers to check a GeoRSS XML file very regularly (e.g., every 30 seconds). 
If the file has an <updated> element with a date/time since the last update, 
OpenLayers would refresh the layer. However, it would seem like a 
GeoRSS-friendly application would update a layer rather than destroy and reload 
it. For example, if only one item was added since the previous load, OpenLayers 
should only have to load that item. Reloading the entire layer each time seems 
inefficient to me, and not fully in the spirit of RSS. This seems especially so 
in the case of a large XML file with many points, and when the data is being 
pulled from remote servers.

Does that make sense? Is the destroy/reload-style refresh the only option for 
GeoRSS?

Thanks again!

Bill


Bill Hubick
william.hub...@cobham.com

Please consider the environment before printing this email 




From: users-requ...@openlayers.org
Sent: Tue 8/10/2010 1:23 PM
To: users@openlayers.org
Subject: Users Digest, Vol 47, Issue 35


Send Users mailing list submissions to
        users@openlayers.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://openlayers.org/mailman/listinfo/users
or, via email, send a message with subject or body 'help' to
        users-requ...@openlayers.org

You can reach the person managing the list at
        users-ow...@openlayers.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Users digest..."


Today's Topics:

   1. Re: Add custom control, possible? (Planet)x)
   2. Re: Add custom control, possible? (Planet)x)
   3. Auto-refreshing a GeoRSS layer (Hubick, William)
   4. Re: Auto-refreshing a GeoRSS layer (Bart van den Eijnden)
   5. Re: Auto-refreshing a GeoRSS layer (Alexandre Dube)
   6. Re: RE  wmsGetFeatureInfo with Mapserver (Bennos)
   7. Re: Auto-refreshing a GeoRSS layer (christopher.schm...@nokia.com)


----------------------------------------------------------------------

Message: 1
Date: Tue, 10 Aug 2010 09:26:33 -0700 (PDT)
From: "Planet)x" <andrew.stew...@reddeer.ca>
Subject: Re: [OpenLayers-Users] Add custom control, possible?
To: users@openlayers.org
Message-ID: <1281457593675-5393782.p...@n2.nabble.com>
Content-Type: text/plain; charset=us-ascii


Sorry I figured out how to add a custom control by using the Button control
and creating a function to run when the button is clicked. My next question
is how do I change the icon image of the button if I want to have 2 or more
custom buttons? i was able to change the icon of one by using the following
code but it is the same for each button, I need different icons for each.
Thanks for advice.

        .olControlPanel .olControlButtonItemActive { 
          background-color: blue;
          background-image:
url("OpenLayers-2.9.1/theme/default/img/pan_on.png");
        }
        .olControlPanel .olControlButtonItemInActive { 
          background-color: orange;
          background-image:
url("OpenLayers-2.9.1/theme/default/img/pan_off.png");



            var btn = new OpenLayers.Control.Button({trigger: onTrigger});
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Add-custom-control-possible-tp5393642p5393782.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


------------------------------

Message: 2
Date: Tue, 10 Aug 2010 09:51:15 -0700 (PDT)
From: "Planet)x" <andrew.stew...@reddeer.ca>
Subject: Re: [OpenLayers-Users] Add custom control, possible?
To: users@openlayers.org
Message-ID: <1281459075486-5393884.p...@n2.nabble.com>
Content-Type: text/plain; charset=us-ascii


Ok I was also able to figure this out -

for the CSS style I did this

        .olControlPanel .olControlButtonHomeItemActive { 
          background-image:
url("OpenLayers-2.9.1/theme/default/img/home.gif");
        }
        .olControlPanel .olControlButtonHomeItemInActive { 
          background-image:
url("OpenLayers-2.9.1/theme/default/img/home.gif");


and for my button I did this -
var btn = new OpenLayers.Control.Button({trigger: onTrigger, title: "Reload
Website", displayClass: 'olControlButtonHome'});

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Add-custom-control-possible-tp5393642p5393884.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


------------------------------

Message: 3
Date: Tue, 10 Aug 2010 13:05:27 -0400
From: "Hubick, William" <william.hub...@cobham.com>
Subject: [OpenLayers-Users] Auto-refreshing a GeoRSS layer
To: "users@openlayers.org" <users@openlayers.org>
Message-ID: <d2126a4c-774e-4229-a6b5-3fff746ae...@mimectl>
Content-Type: text/plain; charset="iso-8859-1"

Hi Everyone,

My project is considering GeoRSS as our data-sharing standard with partners. I 
am pleased with how easily OpenLayers will display GeoRSS points, but I'm 
wondering how other developers ensure efficient auto-updates. My first 
impression was that OpenLayers would automatically check a GeoRSS XML file and 
automatically load updates (i.e., like an RSS aggregator). When further 
exploring, it seems like custom code must be written to auto-update the layer. 

Am I missing something? Is there a way to ensure new points added to a GeoRSS 
file are automatically, efficiently loaded by OpenLayers (without page 
refresh)? It seems like there must be a better way to update the layer than 
destroying and reloading the GeoRSS layer.

Any help would be greatly appreciated!

Thanks in advance,

Bill

Bill Hubick
Cobham Analytic Solutions
william.hub...@cobham.com

Please consider the environment before printing this email 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://openlayers.org/pipermail/users/attachments/20100810/976b17ce/attachment-0001.htm
 

------------------------------

Message: 4
Date: Tue, 10 Aug 2010 19:13:58 +0200
From: Bart van den Eijnden <bart...@osgis.nl>
Subject: Re: [OpenLayers-Users] Auto-refreshing a GeoRSS layer
To: "Hubick, William" <william.hub...@cobham.com>
Cc: "users@openlayers.org" <users@openlayers.org>
Message-ID: <f7c78f72-834b-47c3-9448-73c100d8c...@osgis.nl>
Content-Type: text/plain; charset="us-ascii"

I would use a vector layer with a http protocol pointing to the GeoRSS file, 
and then add a Refresh Strategy.

Something like this (untested, for a refresh every 60 seconds):

                var layer = new OpenLayers.Layer.Vector("mylayer", {
                    strategies: [new OpenLayers.Strategy.Fixed(), new 
OpenLayers.Strategy.Refresh({interval: 60000})],
                    protocol: new OpenLayers.Protocol.HTTP({
                        url:  "http://myhost/mygeorss";,
                        format: new OpenLayers.Format.GeoRSS()
                });

Best regards,
Bart

-- 
Looking for flexible support on OpenLayers or GeoExt? Please check out 
http://www.osgis.nl/support.html

Bart van den Eijnden
OSGIS
bart...@osgis.nl

On Aug 10, 2010, at 7:05 PM, Hubick, William wrote:

> Hi Everyone,
>  
> My project is considering GeoRSS as our data-sharing standard with partners. 
> I am pleased with how easily OpenLayers will display GeoRSS points, but I'm 
> wondering how other developers ensure efficient auto-updates. My first 
> impression was that OpenLayers would automatically check a GeoRSS XML file 
> and automatically load updates (i.e., like an RSS aggregator). When further 
> exploring, it seems like custom code must be written to auto-update the layer.
>  
> Am I missing something? Is there a way to ensure new points added to a GeoRSS 
> file are automatically, efficiently loaded by OpenLayers (without page 
> refresh)? It seems like there must be a better way to update the layer than 
> destroying and reloading the GeoRSS layer.
>  
> Any help would be greatly appreciated!
>  
> Thanks in advance,
>  
> Bill
>  
> Bill Hubick
> Cobham Analytic Solutions
> william.hub...@cobham.com
>  
> Please consider the environment before printing this email 
>  
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://openlayers.org/pipermail/users/attachments/20100810/1d52c928/attachment-0001.htm
 

------------------------------

Message: 5
Date: Tue, 10 Aug 2010 13:14:19 -0400
From: Alexandre Dube <ad...@mapgears.com>
Subject: Re: [OpenLayers-Users] Auto-refreshing a GeoRSS layer
To: users@openlayers.org
Message-ID: <4c6188eb.7080...@mapgears.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi Bill,

   I never used it, but it would seem that the 'Refresh' Strategy could 
do the trick for you.

Regards,

Alexandre


On 10-08-10 01:05 PM, Hubick, William wrote:
> Hi Everyone,
> My project is considering GeoRSS as our data-sharing standard with 
> partners. I am pleased with how easily OpenLayers will display GeoRSS 
> points, but I'm wondering how other developers ensure efficient 
> auto-updates. My first impression was that OpenLayers would 
> automatically check a GeoRSS XML file and automatically load updates 
> (i.e., like an RSS aggregator). When further exploring, it seems like 
> custom code must be written to auto-update the layer.
> Am I missing something? Is there a way to ensure new points added to a 
> GeoRSS file are automatically, efficiently loaded by OpenLayers 
> (without page refresh)? It seems like there must be a better way to 
> update the layer than destroying and reloading the GeoRSS layer.
> Any help would be greatly appreciated!
> Thanks in advance,
> Bill
> *Bill Hubick*
> Cobham Analytic Solutions
> william.hub...@cobham.com <mailto:william.hub...@cobham.com>
> *Please consider the environment before printing this email*
>
>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>    


-- 
Alexandre Dub?
Mapgears
www.mapgears.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://openlayers.org/pipermail/users/attachments/20100810/9b1a3673/attachment-0001.htm
 

------------------------------

Message: 6
Date: Tue, 10 Aug 2010 10:15:14 -0700 (PDT)
From: Bennos <benjaminprei...@gmx.at>
Subject: Re: [OpenLayers-Users] RE  wmsGetFeatureInfo with Mapserver
To: users@openlayers.org
Message-ID: <1281460514970-5393989.p...@n2.nabble.com>
Content-Type: text/plain; charset=us-ascii


Hi,

Steve, thank you! The logs didnt help, but the link to the other
implementation of the GetFeatureInfo.

My mistake was, that i used an OpenLayers.Layer.MapServer instead of an
OpenLayers.Layer.WMS ... so it couldnt work. I also added the highlightLayer
from the example- i dont know exactly what its purpose is - just to be sure.

Cheers,
Benjamin
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/wmsGetFeatureInfo-with-Mapserver-tp5392643p5393989.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


------------------------------

Message: 7
Date: Tue, 10 Aug 2010 19:22:52 +0200
From: <christopher.schm...@nokia.com>
Subject: Re: [OpenLayers-Users] Auto-refreshing a GeoRSS layer
To: <william.hub...@cobham.com>
Cc: users@openlayers.org
Message-ID: <a993a915-23d8-44b0-8d72-36936749e...@nokia.com>
Content-Type: text/plain; charset="us-ascii"


On Aug 10, 2010, at 1:05 PM, ext Hubick, William wrote:

> Hi Everyone,
>  
> My project is considering GeoRSS as our data-sharing standard with partners. 
> I am pleased with how easily OpenLayers will display GeoRSS points, but I'm 
> wondering how other developers ensure efficient auto-updates. My first 
> impression was that OpenLayers would automatically check a GeoRSS XML file 
> and automatically load updates (i.e., like an RSS aggregator). When further 
> exploring, it seems like custom code must be written to auto-update the layer.
>  
> Am I missing something? Is there a way to ensure new points added to a GeoRSS 
> file are automatically, efficiently loaded by OpenLayers (without page 
> refresh)? It seems like there must be a better way to update the layer than 
> destroying and reloading the GeoRSS layer.

In general, RSS feeds are not updated in 'realtime' -- there
is no way that an RSS feed can 'push' data to the client consuming
it.

Using an OpenLayers.Layer.Vector, with a Protocol.HTTP, and a 
Strategy.Refresh, which has:

     * Property: interval
     * {Number} Auto-refresh. Default is 0.  If > 0, layer will be refreshed 
     *     every N milliseconds.
     */
    interval: 0,

would allow you to tell OpenLayers to re-load the GeoRSS file
from the server every $interval milliseconds.

This doesn't solve the need to have real-time updates, but it allows
you to implement a refresh without a page reload.

-- Chris

> Any help would be greatly appreciated!
>  
> Thanks in advance,
>  
> Bill
>  
> Bill Hubick
> Cobham Analytic Solutions
> william.hub...@cobham.com
>  
> Please consider the environment before printing this email 
>  
> <ATT00001..txt>



------------------------------

_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


End of Users Digest, Vol 47, Issue 35
*************************************
_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

Reply via email to