Removed modifications to Array.prototype and moved them into OL.Util instead. All tests pass.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1590 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Schuyler Erle
2006-10-05 15:18:02 +00:00
parent efa9499d57
commit 4739147a2f
12 changed files with 55 additions and 85 deletions
+2 -2
View File
@@ -327,7 +327,7 @@ OpenLayers.Map.prototype = {
this.layerContainerDiv.removeChild(layer.div);
}
layer.map = null;
this.layers.remove(layer);
OpenLayers.Util.removeItem(this.layers, layer);
// if we removed the base layer, need to set a new one
if (this.baseLayer == layer) {
@@ -432,7 +432,7 @@ OpenLayers.Map.prototype = {
* @param {OpenLayers.Popup} popup
*/
removePopup: function(popup) {
this.popups.remove(popup);
OpenLayers.Util.removeItem(this.popups, popup);
if (popup.div) {
try { this.layerContainerDiv.removeChild(popup.div); }
catch (e) { } // Popups sometimes apparently get disconnected