[Mapbender-commits] r7739 - trunk/mapbender/http/plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Apr 4 09:28:11 EDT 2011


Author: verenadiewald
Date: 2011-04-04 06:28:11 -0700 (Mon, 04 Apr 2011)
New Revision: 7739

Modified:
   trunk/mapbender/http/plugins/mb_background.js
Log:
http://trac.osgeo.org/mapbender/ticket/808

Modified: trunk/mapbender/http/plugins/mb_background.js
===================================================================
--- trunk/mapbender/http/plugins/mb_background.js	2011-04-04 12:39:08 UTC (rev 7738)
+++ trunk/mapbender/http/plugins/mb_background.js	2011-04-04 13:28:11 UTC (rev 7739)
@@ -54,11 +54,11 @@
 
 var BackgroundApi = function (o) {
 
-	Mapbender.events.init.register(function () {
+	Mapbender.events.afterInit.register(function () {
 		o.$target.each(function () {
 			var $map = $(this);
 			var map = $map.mapbender();
-
+			
 			var $bgRadio = $("<div />")
 				.addClass("container-background-wms");
 
@@ -77,6 +77,12 @@
 					numBackgroundWms++;
 				}
 			});
+			
+			//workaround for overview
+			if(Mapbender.modules['overview']) {
+				Mapbender.modules['overview'].wms[0].gui_wms_visible = 1;
+				setSingleMapRequest('overview',Mapbender.modules['overview'].wms[0].wms_id);
+			}
 			// if less than two background wms are found, 
 			// do not display buttons
 			if (numBackgroundWms < 2) {



More information about the Mapbender_commits mailing list