From 04ca5d36954257ef011957fcca2a4595157c0787 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Wed, 17 May 2006 17:25:27 +0000 Subject: [PATCH] Create a clone method for Icon. git-svn-id: http://svn.openlayers.org/trunk/openlayers@108 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Icon.js | 5 +++++ 1 file changed, 5 insertions(+) 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); } }