[OpenLayers-Dev] Redraw/Reload layer

Matt Priour mpriour at kestrelcomputer.com
Tue Apr 6 14:32:46 EDT 2010

You just simply use the basic javascript setTimeout function.
something like
//refresh the wms layer every 2 min
setTimeout(function(){myWMSLayer.redraw()}, 2*60*1000)

Fabian Patzke (OL) wrote:
> When I first read the 2.9RC1 announcement I thought there would be an
> generic method to redraw a layer every x seconds, but its only for a
> Vector based layer.
> I thought it would be very neat to have such a functionality i.e. also for
> WMS layers. We have WMS layers here that shows the positions of GPS boxes,
> so it should be reloaded after some time.
> Is there anything I can use for this, off course the strategy wont work.
> If not I would try to create a control that provides the same/similar
> functionality also for non vector layers.
> Does this make sense to you, or am I thinking totally in the wrong
> direction.
> Greetings,
> Fabian

View this message in context: http://n2.nabble.com/Redraw-Reload-layer-tp4859146p4860546.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.

More information about the Dev mailing list