diff --git a/lib/OpenLayers/Layer/Marker.js b/lib/OpenLayers/Layer/Marker.js index 2f1d63402e..d33128f3a7 100644 --- a/lib/OpenLayers/Layer/Marker.js +++ b/lib/OpenLayers/Layer/Marker.js @@ -44,24 +44,11 @@ OpenLayers.Layer.Marker.prototype = * Use the map to recalculate new placement of markers. */ redraw: function() { - - this.clear(); for(i=0; i < this.markers.length; i++) { this.drawMarker(this.markers[i]); } - }, - /** This function clears the visual display of the markers, without - * removing them from memory (this.markers array). - * - * @private - */ - clear: function() { - this.div.innerHTML = ""; - }, - - /** Calculate the screen pixel location for the marker, create it, and * add it to the layer's div * @@ -72,7 +59,10 @@ OpenLayers.Layer.Marker.prototype = drawMarker: function(marker) { var px = this.map.getPixelFromLonLat(marker.lonlat); var markerDiv = marker.draw(px); - this.div.appendChild(markerDiv); + if (marker.drawn != 1) { + this.div.appendChild(markerDiv); + marker.drawn = 1; + } }, /** @final @type String */