<br><br>On Monday, November 28, 2011, matth1as &lt;<a href="mailto:mnick86@gmail.com">mnick86@gmail.com</a>&gt; wrote:<br>&gt; Hi, I have the following Problem: I have a Vector Layer with Strategy Fixed,<br>&gt; Protocol HTTP along with some Parameters which are returned by a function:<br>
&gt;<br>&gt; var opts = {<br>&gt;  projection: map.displayProjection,<br>&gt;  strategies: [new OpenLayers.Strategy.Fixed()],<br>&gt;  protocol: new OpenLayers.Protocol.HTTP({<br>&gt;  url: &quot;nodes.gojson.php&quot;,<br>
&gt;  format: new OpenLayers.Format.GeoJSON({}),<br>&gt;  params: {&#39;day&#39;:getSelectedDay(), &#39;month&#39;:getSelectedMonth(),<br>&gt; &#39;year&#39;:getSelectedYear()},<br>&gt;  readWithPOST:true<br>&gt;  })<br>&gt;  };<br>
&gt; sundials = new OpenLayers.Layer.Vector(&quot;KML&quot;, opts);<br>&gt;<br>&gt; This works as expected, the POST request contains the parameters (e.g.<br>&gt; day=1, month=2, year=2011).<br>&gt;<br>&gt; A few seconds later, I change day=10,month=12,year=2012 and call<br>
&gt; sundials.refresh() to refresh the vector layer.<br>&gt;<br>&gt; But here is the Problem, the new request contains the old values (1,2,2011)<br>&gt; ?!<br><br>Yes, because your getSelected* functions are called once, when the &quot;params&quot; object is created. To change params after the creation of the HTTP protocol do layer.protocol.params.day = &#39;new day&#39;.<br>
<br>Cheers,<br><br>-- <br>Eric Lemoine<br><br>Camptocamp France SAS<br>Savoie Technolac, BP 352<br>73377 Le Bourget du Lac, Cedex<br><br>Tel : 00 33 4 79 44 44 96<br>Mail : <a href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a><br>
<a href="http://www.camptocamp.com">http://www.camptocamp.com</a><br><br>