diff --git a/lib/OpenLayers/Icon.js b/lib/OpenLayers/Icon.js index c48a72cb04..880f079dd5 100644 --- a/lib/OpenLayers/Icon.js +++ b/lib/OpenLayers/Icon.js @@ -10,5 +10,10 @@ OpenLayers.Icon.prototype = { initialize: function(url, size) { this.size = size; this.url = url; + }, + + // Create a copy of this icon. + clone: function() { + return new OpenLayers.icon(this.size, this.url); } }