From f04d11011941a2a6b56f83f4eb4ea973726e4264 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Mon, 27 Aug 2007 17:28:12 +0000 Subject: [PATCH] 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 --- lib/OpenLayers/Marker.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/OpenLayers/Marker.js b/lib/OpenLayers/Marker.js index 8f7db3da6e..54991974f5 100644 --- a/lib/OpenLayers/Marker.js +++ b/lib/OpenLayers/Marker.js @@ -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;