[OpenLayers-Users] pb with Strategy.Refresh

Sébastien Geindre sebastien.geindre at meteo.fr
Wed Jul 28 03:50:57 EDT 2010


hi all,

Some pbs with Strategy.Refresh :
Imagine the following layer :

var layer = new OpenLayers.Layer.Vector("FIR+Sigmets", {
		strategies : [ new OpenLayers.Strategy.BBOX()
		              ,new OpenLayers.Strategy.Refresh(
				{force: true, interval:  10000  } )] ,
		protocol : new OpenLayers.Protocol.HTTP( {
			url : "./xml/data.xml",
		  	params: { 'key': Math.random()},
			format : myformat
				}),
		styleMap : new OpenLayers.StyleMap(style),
		renderers : [ "Canvas", "SVG", "VML" ],
		projection : map.displayProjection
	});

I noticed *2 pbs :

1/ If i add a control select : selectControl = new 
OpenLayers.Control.SelectFeature(layer), with an open popup on feature 
selection. The pb is that when the layer is refreshed, the popups are 
not erased...The layer changed, and it is not possible to access to the 
layer used to create popup...

2/ In the example, note that the url of protocol.HTTP includes a 
Math.random() key. Refresh process does not seem to generate again the 
key param...

any help during  this hot summer ?




More information about the Users mailing list