add removeLayer() function to Layers... implement it for EventPane so that it removes the extra 'pane' div when the layer is removed. (Closes #887)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4053 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -105,6 +105,20 @@
|
||||
layer.setVisibility(true);
|
||||
t.eq(layer.visibility, true, "layer pane is now visible");
|
||||
}
|
||||
|
||||
|
||||
function test_Layer_EventPane_removeLayer(t) {
|
||||
t.plan(1);
|
||||
var map = new OpenLayers.Map('map');
|
||||
|
||||
layer = new OpenLayers.Layer.EventPane('Test Layer');
|
||||
layer.loadMapObject = function() { };
|
||||
layer.getWarningHTML = function() { this.warning = true; return ""; };
|
||||
map.addLayer(layer);
|
||||
map.removeLayer(layer);
|
||||
t.eq(layer.pane, null, "Layer.pane is null after being removed.");
|
||||
}
|
||||
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user