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:
@@ -643,7 +643,15 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
|
||||
/**
|
||||
* 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() {
|
||||
// if unloadDestroy is null, we've already been destroyed
|
||||
|
||||
Reference in New Issue
Block a user