Activating strategies after adding the layer to the map. r=elemoine (closes #1920)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9266 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -454,6 +454,21 @@
|
||||
"(fractionalZoom true) returns resolution for zoom beyond res length - 1");
|
||||
|
||||
}
|
||||
|
||||
function test_afterAdd(t) {
|
||||
|
||||
t.plan(1);
|
||||
|
||||
var map = new OpenLayers.Map("map");
|
||||
var layer = new OpenLayers.Layer(null, {isBaseLayer: true});
|
||||
var hasBase = false;
|
||||
layer.afterAdd = function() {
|
||||
hasBase = !!(layer.map && layer.map.baseLayer);
|
||||
}
|
||||
map.addLayer(layer);
|
||||
t.eq(hasBase, true, "when afterAdd is called, map has a base layer");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user