#475: removeMarker does not work in Boxes Layer . Patch from euzuro. This

was approved before 2.3 released, but never applied. Adds a removeMarker
function for the boxes layer, subclassing the marker default.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2302 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-03-05 07:02:40 +00:00
parent 9bbf96fd1d
commit d36553f135

View File

@@ -44,6 +44,19 @@ OpenLayers.Layer.Boxes.prototype =
}
},
/** OVERRIDDEN
*
* @param {OpenLayers.Marker} marker
*/
removeMarker: function(marker) {
OpenLayers.Util.removeItem(this.markers, marker);
if ((marker.div != null) &&
(marker.div.parentNode == this.div) ) {
this.div.removeChild(marker.div);
}
},
/** @final @type String */
CLASS_NAME: "OpenLayers.Layer.Boxes"
});