I'm using OpenLayers BBOX strategy to filter data at boundary level.My layer specified as:
var layer = new OpenLayers.Layer.Vector("Vector Data", {
isBaseLayer: false,
styleMap: sm,
strategies: [new OpenLayers.Strategy.BBOX({ resFactor: 1, ratio: 1 })],
sphericalMercator: true,
protocol: new OpenLayers.Protocol.HTTP({
url: "somehandler.ashx", //which returns JSON at boundary level
format: new OpenLayers.Format.GeoJSON(options_proj),
noAbort: false //which cancels all unfinished requests
});
Also,I need to refresh my layer manually in order to add some extra parameters
map.events.register("moveend",map,function(e){
layer.refresh({force:true,params:{'resolution':_res});
});
Unfortunately,I'm encountered some problems when users
1) After changing visibility (false -> true) of above layer,layer automatically re-requests and redraws(triggers moveend) in which normal conditions this scenario is correct but not true when either zoom & bounds not changed.
How can I keep features without requesting them all along ?
2) I'm also using SelectFeature control to hover&select features on this layer,when boundary changes the selection lost due to strategy that has to remove all before new features come in.
How can I keep the selection after redraw??
Best Regards
UPDATE: I forgot to put resFactor & ratio options on BBOX strategy