ol.Map:destroy is back (api tests pass again)

This commit is contained in:
Éric Lemoine
2012-07-09 21:09:42 +02:00
parent 7c7cd08494
commit 04f87f8f73
3 changed files with 9 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ goog.require('ol.loc');
goog.require('ol.projection');
goog.require('ol.error');
goog.require('goog.dispose');
/**
* @typedef {ol.Map|{center, zoom, numZoomLevels, projection, userProjection, maxExtent, maxResolution, resolutions, renderTo, layers, controls}|string}
@@ -247,3 +248,9 @@ ol.Map.prototype.renderTo = function(arg) {
this.setContainer(goog.dom.getElement(arg));
return this;
};
/**
*/
ol.Map.prototype.destroy = function() {
goog.dispose(this);
};

View File

@@ -13,6 +13,7 @@ goog.exportProperty( ol.Map.prototype, 'resolutions', ol.Map.prototype.resolutio
goog.exportProperty( ol.Map.prototype, 'layers', ol.Map.prototype.layers );
goog.exportProperty( ol.Map.prototype, 'controls', ol.Map.prototype.controls );
goog.exportProperty( ol.Map.prototype, 'maxExtent', ol.Map.prototype.maxExtent );
goog.exportProperty( ol.Map.prototype, 'destroy', ol.Map.prototype.destroy );
// ol.loc
goog.exportSymbol('ol.loc', ol.loc );

View File

@@ -82,4 +82,4 @@ ol.control.Control.prototype.deactivate = function() {
ol.control.Control.prototype.destroy = function() {
this.deactivate();
goog.object.clear(this);
};
};