<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<STYLE type=text/css>DIV {
        MARGIN: 0px
}
</STYLE>
<META content="MSHTML 6.00.5730.11" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=056234321-31012007><FONT face="Trebuchet MS"
size=2>The Layer.mergeNewParams() function can be called to trigger the redraw
of a specific layer. If you want the layer to be redrawn with a new
parameter value, then do something like:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=056234321-31012007><FONT face="Trebuchet MS"
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=056234321-31012007><FONT face="Trebuchet MS"
size=2>myLayer.mergeNewParams({'param1': value1});</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=056234321-31012007><FONT face="Trebuchet MS"
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=056234321-31012007><FONT face="Trebuchet MS"
size=2>If you aren't changing a specific parameter value in the WMS layer, but
you want the layer to be refreshed (and not use any browser cached images), then
you can tack on an unused parameter name and give it a random
value:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=056234321-31012007><FONT face="Trebuchet MS"
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=056234321-31012007><FONT face="Trebuchet MS"
size=2>myLayer.mergeNewParams({'uniqueName':
Math.random()});</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=056234321-31012007><FONT face="Trebuchet MS"
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=056234321-31012007></SPAN><FONT
face="Trebuchet MS"><FONT size=2>H<SPAN class=056234321-31012007>ope that
helps,</SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT><FONT size=2><SPAN
class=056234321-31012007></SPAN></FONT></FONT><SPAN
class=056234321-31012007></SPAN><FONT face="Trebuchet MS"><FONT size=2>T<SPAN
class=056234321-31012007>im</SPAN></FONT></FONT></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> users-bounces@openlayers.org
[mailto:users-bounces@openlayers.org] <B>On Behalf Of </B>Matthew
White<BR><B>Sent:</B> Wednesday, January 31, 2007 2:40 PM<BR><B>To:</B>
users@openlayers.org<BR><B>Subject:</B> [OpenLayers-Users] Forcing a refresh
of a layer<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">
<DIV>Hello,<BR><BR>Please forgive me if this is a basic question, as I am
relatively new to OpenLayers. What I would like to do is force a
refresh\reload of a layer when the user performs an action. I am using a WMS
layer, and the data being rendered may be changed or rendered differently when
the user performs an action. Is there a way to force the redraw of a layer, or
failing that the whole map (i.e., layer.redraw() etc)?<BR><BR>Thanks in
advance,<BR>Matt<BR></DIV></DIV><BR>
<HR SIZE=1>
The fish are biting.<BR><A
href="http://us.rd.yahoo.com/evt=49679/*http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php?o=US2140&cmp=Yahoo&ctv=Q107Tagline&s=Y&s2=EM&b=50">Get
more visitors</A> on your site using <A
href="http://us.rd.yahoo.com/evt=49679/*http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php?o=US2140&cmp=Yahoo&ctv=Q107Tagline&s=Y&s2=EM&b=50">Yahoo!
Search Marketing.</A></BLOCKQUOTE></BODY></HTML>