[Mapbender-commits] r4852 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Oct 23 04:48:50 EDT 2009


Author: verenadiewald
Date: 2009-10-23 04:48:49 -0400 (Fri, 23 Oct 2009)
New Revision: 4852

Modified:
   trunk/mapbender/http/javascripts/mod_wfs_gazetteer_client.php
Log:
clearGazetteer before appending new wfs conf form

Modified: trunk/mapbender/http/javascripts/mod_wfs_gazetteer_client.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_wfs_gazetteer_client.php	2009-10-23 05:11:06 UTC (rev 4851)
+++ trunk/mapbender/http/javascripts/mod_wfs_gazetteer_client.php	2009-10-23 08:48:49 UTC (rev 4852)
@@ -459,8 +459,21 @@
 	
 }
 
+function clearWFSGazetteer()
+{
+	// empty nodes
+	var nodesToEmpty = ["selectWfsConfForm", "wfsForm", "res", "wfsIcons"];
+	while (nodesToEmpty.length > 0) {
+		var currentId = nodesToEmpty.pop();
+		var currentNode = document.getElementById(currentId);
+		removeChildNodes(currentNode);
+	}
+
+}
+
 function reapplyWFSConfObject(json,status)
 {
+		clearWFSGazetteer();
 		global_wfsConfObj = json;
 		var wfsCount = 0;
 		for (var wfsConfId in global_wfsConfObj) {



More information about the Mapbender_commits mailing list