Extending Map.js documentation to include comment regarding destroy from

#2277.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@11454 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2011-02-25 07:25:03 +00:00
parent b22963a2ef
commit 4be8f72afe
+9 -1
View File
@@ -643,7 +643,15 @@ OpenLayers.Map = OpenLayers.Class({
/** /**
* APIMethod: destroy * APIMethod: destroy
* Destroy this map * Destroy this map.
* Note that if you are using an application which removes a container
* of the map from the DOM, you need to ensure that you destroy the
* map *before* this happens; otherwise, the page unload handler
* will fail because the DOM elements that map.destroy() wants
* to clean up will be gone. (See
* http://trac.osgeo.org/openlayers/ticket/2277 for more information).
* This will apply to GeoExt and also to other applications which
* modify the DOM of the container of the OpenLayers Map.
*/ */
destroy:function() { destroy:function() {
// if unloadDestroy is null, we've already been destroyed // if unloadDestroy is null, we've already been destroyed