[OpenLayers-Users] How to refresh a layer being displayed?

Arnd Wippermann arnd.wippermann at web.de
Fri May 17 08:45:41 PDT 2013


try

wmsLayer.redraw({force:true}); 

vectorLayer.refresh({force:true});

Arnd

-----Ursprüngliche Nachricht-----
Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Samuel
Gilbert
Gesendet: Freitag, 17. Mai 2013 17:07
An: openlayers-users at lists.osgeo.org
Betreff: [OpenLayers-Users] How to refresh a layer being displayed?

Hello,

  I am displaying a few layers containing some data that change over time
(ie. 
Weather Radar).  Is there a way to ask OpenLayers to fetch the up-to-date
tiles from the server?  The same GetMap request will respond different tiles
at different points in time.

  So far, the only solution I found is to delete the layer and create a new
one with the exact same properties.  This isn't very nice; is there a better
way to do this?

Samuel
_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users



More information about the Users mailing list