Adding an option to make the bbox strategy more agressive. Thanks for completing the tests crschmidt. r=crschmidt,igrcic (closes #1830)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9087 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2009-03-18 17:42:14 +00:00
parent eb03ccc02d
commit baf260c6f1
2 changed files with 59 additions and 1 deletions
+27
View File
@@ -165,6 +165,33 @@
map.destroy();
}
function test_resFactor(t) {
t.plan(2);
var map = new OpenLayers.Map("map");
var bbox = new OpenLayers.Strategy.BBOX();
var fakeProtocol = new OpenLayers.Protocol({
'read': function() {
t.ok(true, "read called once without resfactor");
}
});
var layer = new OpenLayers.Layer.Vector("test", {
strategies: [bbox],
protocol: fakeProtocol,
isBaseLayer: true
});
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
map.zoomIn();
fakeProtocol.read = function() {
t.ok("read called again on zooming with resFactor: 1");
}
bbox.resFactor = 1;
map.zoomIn();
}
function test_createFilter(t) {
t.plan(3);