Well, it turns out that you can't do a refresh strategy on a WMS service, as
far as I can tell. So I converted my code to use WFS instead, and it works
as expected. The working code:

            underway = new OpenLayers.Layer.Vector("WFS", {
                strategies: [new OpenLayers.Strategy.BBOX(), new
OpenLayers.Strategy.Refresh({interval: 4000, force: true})],
                protocol: new OpenLayers.Protocol.WFS({
                    url: 
"http://ubuntu-geospatial-server:8080/geoserver/wfs";,
                    featureType: "ss2011_v03",
                    featureNS: "http://csiro.au/underway";,
                    geometryName: "position"
                });

Note that I also need a BBOX strategy. Another gotcha that I found was that
I needed to manually specify the geometryName, otherwise it would default to
"the_geom", which doesn't exist for my layer.

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/OpenLayers-Refresh-Strategy-Problems-tp6856908p6857254.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to