[OpenLayers-Users] WMS layer redraw problem
Eric Lemoine
eric.lemoine at camptocamp.com
Thu May 13 04:17:31 EDT 2010
On Wednesday, May 12, 2010, Nathan Gerber <ngerber999 at gmail.com> wrote:
> I have found that the most reliable way to avoid browser caching when I want to force a redraw of a WMS layer is to do something like this:
> wms_layer.mergeNewParams({'timestamp':datetime});
>
> If you append the current timestamp to the layer each time you want to do a redraw it will have a unique address and thus bypass browser caching. If you do this you will not need to utilize the OpenLayers redraw function.
redraw(true) calls mergeNewParams but uses Math.random instead of datetime.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com
More information about the Users
mailing list