Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

share|improve this question

migrated from stackoverflow.com Sep 28 '12 at 2:38

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.