svn commit: r521 - trunk/mapbender/http/javascripts/map.php

christoph at osgeo.org christoph at osgeo.org
Mon Jun 19 11:00:09 EDT 2006


Author: christoph
Date: 2006-06-19 15:00:09+0000
New Revision: 521

Modified:
   trunk/mapbender/http/javascripts/map.php

Log:
added function cloneObject

Modified: trunk/mapbender/http/javascripts/map.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/map.php?view=diff&rev=521&p1=trunk/mapbender/http/javascripts/map.php&p2=trunk/mapbender/http/javascripts/map.php&r1=520&r2=521
==============================================================================
--- trunk/mapbender/http/javascripts/map.php	(original)
+++ trunk/mapbender/http/javascripts/map.php	2006-06-19 15:00:09+0000
@@ -126,6 +126,17 @@
 	}
 }
 
+function cloneObject(a){
+	var z = new Array();
+	
+	for (attr in a) {
+		var b = a[attr];
+		if (typeof(b) == "object") {z[attr] = cloneObject(b);}
+		else z[attr] = b;
+	}	
+	return z;
+}
+
 function deleteWmsObject() {
 	wms = new Array();
 	wms_layer_count = 0;




More information about the Mapbender_commits mailing list