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:
@@ -104,6 +104,22 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, {
|
||||
this.loadWarningMessage();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* APIMethod: removeMap
|
||||
* On being removed from the map, we'll like to remove the invisible 'pane'
|
||||
* div that we added to it on creation.
|
||||
*
|
||||
* Parameters:
|
||||
* map - {<OpenLayers.Map>}
|
||||
*/
|
||||
removeMap: function(map) {
|
||||
if (this.pane && this.pane.parentNode) {
|
||||
this.pane.parentNode.removeChild(this.pane);
|
||||
this.pane = null;
|
||||
}
|
||||
OpenLayers.Layer.prototype.removeMap.apply(this, arguments);
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: loadWarningMessage
|
||||
|
||||
Reference in New Issue
Block a user