Merge branch 'master' into fixed-strategy

This commit is contained in:
friedjoff
2013-04-30 12:44:17 +02:00
330 changed files with 3632 additions and 1924 deletions

View File

@@ -51,7 +51,7 @@
});
// create a map with the layers and a center
var map = new OpenLayers.Map("map");
var map = new OpenLayers.Map("map", {zoomMethod: null});
map.addLayers([dummy, layer]);
map.zoomToMaxExtent();
@@ -206,7 +206,7 @@
function test_resFactor(t) {
t.plan(2);
var map = new OpenLayers.Map("map");
var map = new OpenLayers.Map("map", {zoomMethod: null});
var bbox = new OpenLayers.Strategy.BBOX();
var fakeProtocol = new OpenLayers.Protocol({
'read': function() {

View File

@@ -44,7 +44,8 @@
});
var map = new OpenLayers.Map('map', {
resolutions: [4, 2, 1],
maxExtent: new OpenLayers.Bounds(-40, -40, 40, 40)
maxExtent: new OpenLayers.Bounds(-40, -40, 40, 40),
zoomMethod: null
});
map.addLayer(layer);

View File

@@ -31,6 +31,21 @@
"activates registers visibilitychanged listener");
}
function test_deactivate(t) {
t.plan(3);
var l = new OpenLayers.Layer.Vector();
l.setVisibility(false);
var s = new OpenLayers.Strategy.Refresh();
s.setLayer(l);
s.activate();
var deactivated = s.deactivate();
t.eq(deactivated, true, "deactivate returns true");
t.eq(s.active, false, "deactivated after activate");
t.ok(l.events.listeners.visibilitychanged.length == 0,
"deactivate unregisters visibilitychanged listener");
}
function test_activateWithVisibleLayer(t) {
t.plan(5);