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:
@@ -79,6 +79,13 @@ OpenLayers.Marker = OpenLayers.Class({
|
|||||||
this.events = new OpenLayers.Events(this, this.icon.imageDiv, null);
|
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() {
|
destroy: function() {
|
||||||
this.map = null;
|
this.map = null;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user