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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Feb 17 09:52:03 EST 2010


Author: christoph
Date: 2010-02-17 09:52:02 -0500 (Wed, 17 Feb 2010)
New Revision: 5511

Modified:
   trunk/mapbender/http/javascripts/mod_wfs_gazetteer_client.php
Log:


Modified: trunk/mapbender/http/javascripts/mod_wfs_gazetteer_client.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_wfs_gazetteer_client.php	2010-02-16 16:06:05 UTC (rev 5510)
+++ trunk/mapbender/http/javascripts/mod_wfs_gazetteer_client.php	2010-02-17 14:52:02 UTC (rev 5511)
@@ -45,10 +45,6 @@
 	echo "var e_id_css = '" . $e_id_css . "';";
 ?>
 
-parent.Mapbender.events.init.register(function() {
-	parent.Mapbender.modules.gazetteerWFS.receiveFeatureCollection = new parent.Mapbender.Event();
-});
-
 // Element var maxHighlightedPoints
 try{
 	if (maxHighlightedPoints){
@@ -211,16 +207,24 @@
 }
 // end of button management spatialRequest ///////////
 
-parent.Mapbender.events.init.register(function () {
+var mapbenderInit = function () {
 	try {
+		parent.Mapbender.modules.gazetteerWFS.receiveFeatureCollection = new parent.Mapbender.Event();
 		initModWfsGazetteer();	
 		init_wfsSpatialRequest();	
 	}
 	catch (exc) {
 		
 	}
-});
+};
 
+if (parent.Mapbender.events.init.done === true) {
+	mapbenderInit();
+}
+else {
+	parent.Mapbender.events.init.register(mapbenderInit);
+}
+
 parent.Mapbender.events.localize.register(function() {
     localizeGazetteer();
 });
@@ -1202,7 +1206,7 @@
 						document.getElementById("res").innerHTML = '';
 						alert("No results.");
 					}
-					initializeOnLoad = 0;
+					AializeOnLoad = 0;
 		       	}
 			});
 		}



More information about the Mapbender_commits mailing list