[OpenLayers-Users] Reload/refresh WMS layer

Luís de Sousa luis.a.de.sousa at gmail.com
Wed Feb 17 14:50:30 EST 2010


Hello everyone,

I have a wms layer that needs to be reload/refreshed after the
introduction of a new feature into a WFS layer. Reading previous
messages to this list I tried the following:

myWMSLayer.mergeNewParams({'random':Math.random()});
myWMSLayer.redraw(true);

without result. I then tried to remove and add the layer again to the map:

map.removeLayer(myWMSLayer, false);
map.addLayer(myWMSLayer);

again this code fails to refresh the layer.

What can I do to force the code to fetch the layer?

Thank you,

Luís



More information about the Users mailing list