[Mapbender-commits] r8053 - in branches/2.7/http: javascripts plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Aug 3 11:04:05 EDT 2011


Author: verenadiewald
Date: 2011-08-03 08:04:05 -0700 (Wed, 03 Aug 2011)
New Revision: 8053

Modified:
   branches/2.7/http/javascripts/mod_setBackground.php
   branches/2.7/http/plugins/mb_handleStartUpWmsParams.php
Log:
new event for setBackground to handle backgroundwms from handleStartupParams in the right way

Modified: branches/2.7/http/javascripts/mod_setBackground.php
===================================================================
--- branches/2.7/http/javascripts/mod_setBackground.php	2011-08-03 11:30:44 UTC (rev 8052)
+++ branches/2.7/http/javascripts/mod_setBackground.php	2011-08-03 15:04:05 UTC (rev 8053)
@@ -30,6 +30,9 @@
 eventAfterLoadWMS.register(function () {
 	mod_setBackground_init();
 });
+
+Mapbender.events.setBackgroundIsReady = new Mapbender.Event();
+
 var mod_setBackground_active = false;
 function mod_setBackground_init(){
 	var map = Mapbender.modules[mod_setBackground_target];
@@ -63,6 +66,8 @@
 		setSingleMapRequest(mod_setBackground_target,map.wms[ind].wms_id);
 	}
 	mod_setBackground_active = ind;
+
+        Mapbender.events.setBackgroundIsReady.trigger();
 }
 
 function mod_setBackground_change(obj){	

Modified: branches/2.7/http/plugins/mb_handleStartUpWmsParams.php
===================================================================
--- branches/2.7/http/plugins/mb_handleStartUpWmsParams.php	2011-08-03 11:30:44 UTC (rev 8052)
+++ branches/2.7/http/plugins/mb_handleStartUpWmsParams.php	2011-08-03 15:04:05 UTC (rev 8053)
@@ -84,7 +84,7 @@
 
 
 // set background WMS
-Mapbender.events.afterInit.register(function () {
+Mapbender.events.setBackgroundIsReady.register(function () {
 	if (apiBackgroundWms !== '') {
 		var newBackgroundWms = parseInt(apiBackgroundWms);
 		if (mod_setBackground_active !== false && wms[mod_setBackground_active]) {



More information about the Mapbender_commits mailing list