#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:
@@ -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 */
|
/** @final @type String */
|
||||||
CLASS_NAME: "OpenLayers.Layer.Boxes"
|
CLASS_NAME: "OpenLayers.Layer.Boxes"
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user