Documentation for Marker.destroy: We can't actually remove the marker from

the layer because we don't have a reference to the layer, but this isn't
adequately documented in the Marker.destroy api docs. (See #932)   


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4058 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-08-27 17:28:12 +00:00
parent 2f9dbd1396
commit f04d110119

View File

@@ -79,6 +79,13 @@ OpenLayers.Marker = OpenLayers.Class({
this.events = new OpenLayers.Events(this, this.icon.imageDiv, null);
},
/**
* APIMethod: destroy
* Destroy the marker. You must first remove the marker from any
* layer which it has been added to, or you will get buggy behavior.
* (This can not be done within the marker since the marker does not
* know which layer it is attached to.)
*/
destroy: function() {
this.map = null;