<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi again,<br>
<br>
I'm trying to display a vector layer (feed data as KML) and I'm trying
to dynamically set some variables that are sent server-side for
processing. <br>
The layer definition is the following:<br>
<pre wrap="">locations = new OpenLayers.Layer.Vector("Alarm Locations", {
                        projection: map.displayProjection, 
minResolution: 1, maxResolution: 38,
                        strategies: [new OpenLayers.Strategy.BBOX()],
                        protocol: new OpenLayers.Protocol.HTTP({ <b>url: 
"kml_locations.pl"</b>, format: new OpenLayers.Format.KML({ extractStyles: 
true, extractAttributes: true })})});
map.addLayer(locations);</pre>
On some event (button pressed) I use a javascript function to replace
the "url" value from the layer definition with a url similar to:
"kml_locations.pl?key1=value1&amp;key2=value2". After this I call <b>layer.refresh({force:
true});<br>
<br>
</b>From analysing the traffic to the web server I can see that the
layer refresh is called on the old url value (kml_locations.pl) even if
the attribute locations.protocol.url is set to the value I imposed.<br>
<br>
My question is: when the layer is refreshed - which URL is used (is
there a cached value)? Can this be overwritten? Or do I need to create
a new Protocol object?<br>
<br>
Thanks,<br>
Adrian<br>
<pre class="moz-signature" cols="72">
</pre>
</body>
</html>