Hi,
 
I think I encountered a bug in /OpenLayers/Strategy/Filter.js:
 
In setFilter(), line 134+135 it says:
 
var previousCache = this.cache;
this.cache = [];
 
However, that code crashes in the first iteration in line 145 
("if(previousCache.length > 0)"), as previousCache is null here. Am I missing 
something? Do I have to init the cache from outside beforehand? I construct the 
Filter object, then construct the layer (specifying the strategy with the 
filter as option), then I call the strategy's setLayer() function and then the 
setFilter() function, which then crashes. If I swap the two lines (line 
134+135) in Filter.js, it works just fine:
 
this.cache = [];
var previousCache = this.cache;
I just started to experiment with this feature (Strategy.Filter), so I dunno 
whether that will create any side-effects.
 
Cheers,
Alex
 
 
 
 
Dr Alexander von Lünen
Research Fellow
Dept. of Geography
University of Portsmouth
Buckingham Building, Lion Terrace
Portsmouth, PO1 3HE, UK
tel: +44-(0)23-9284-2500
fax: +44-(0)23-9284-2512
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to