<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<STYLE type=text/css>DIV {
        MARGIN: 0px
}
</STYLE>

<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=791581311-07032007>Hello,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=791581311-07032007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><SPAN class=791581311-07032007><FONT color=#0000ff 
size=2>I'm trying to force a refresh of a layer, but when I do </FONT>
<DIV dir=ltr align=left><SPAN class=056234321-31012007><FONT face="Trebuchet MS" 
color=#0000ff size=2>myLayer.mergeNewParams({'uniqueName': 
Math.random()});</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=056234321-31012007><SPAN 
class=791581311-07032007><FONT face="Trebuchet MS" color=#0000ff size=2>It 
doesn't anything, what is happend?</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=056234321-31012007><SPAN 
class=791581311-07032007><FONT face="Trebuchet MS" color=#0000ff 
size=2></FONT></SPAN></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=056234321-31012007><SPAN 
class=791581311-07032007><FONT face="Trebuchet MS" color=#0000ff 
size=2>Thanks.</FONT></SPAN></SPAN></DIV></SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Mensaje original-----<BR><B>De:</B> Tim Schaub 
  [mailto:noreply@geocartic.com]<BR><B>Enviado el:</B> miércoles, 31 de enero de 
  2007 22:48<BR><B>Para:</B> users@openlayers.org<BR><B>Asunto:</B> Re: 
  [OpenLayers-Users] Forcing a refresh of a layer<BR><BR></FONT></DIV>
  <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.&nbsp; 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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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 size=+0><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&amp;cmp=Yahoo&amp;ctv=Q107Tagline&amp;s=Y&amp;s2=EM&amp;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&amp;cmp=Yahoo&amp;ctv=Q107Tagline&amp;s=Y&amp;s2=EM&amp;b=50">Yahoo! 
    Search Marketing.</A></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>