Added check for layer.map === map to Map tests.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@62 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
+2
-1
@@ -31,7 +31,7 @@
|
|||||||
t.eq( map.getCenter().lon, 2, "map center lon is correct after calling setCenter");
|
t.eq( map.getCenter().lon, 2, "map center lon is correct after calling setCenter");
|
||||||
}
|
}
|
||||||
function test_03_Map_add_layers(t) {
|
function test_03_Map_add_layers(t) {
|
||||||
t.plan(4);
|
t.plan(5);
|
||||||
map = new OpenLayers.Map($('map'));
|
map = new OpenLayers.Map($('map'));
|
||||||
var layer1 = new OpenLayers.Layer.WMS("Layer 1",
|
var layer1 = new OpenLayers.Layer.WMS("Layer 1",
|
||||||
"http://octo.metacarta.com/cgi-bin/mapserv?",
|
"http://octo.metacarta.com/cgi-bin/mapserv?",
|
||||||
@@ -43,6 +43,7 @@
|
|||||||
t.eq( map.layers.length, 2, "map has exactly two layers" );
|
t.eq( map.layers.length, 2, "map has exactly two layers" );
|
||||||
t.ok( map.layers[0] === layer1, "1st layer is layer1" );
|
t.ok( map.layers[0] === layer1, "1st layer is layer1" );
|
||||||
t.ok( map.layers[1] === layer2, "2nd layer is layer2" );
|
t.ok( map.layers[1] === layer2, "2nd layer is layer2" );
|
||||||
|
t.ok( layer1.map === map, "layer.map is map" );
|
||||||
t.eq( parseInt(layer1.div.style.zIndex), map.Z_INDEX_BASE['Layer'],
|
t.eq( parseInt(layer1.div.style.zIndex), map.Z_INDEX_BASE['Layer'],
|
||||||
"layer1 zIndex is set" );
|
"layer1 zIndex is set" );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user