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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Aug 27 06:48:29 PDT 2012


Author: verenadiewald
Date: 2012-08-27 06:48:29 -0700 (Mon, 27 Aug 2012)
New Revision: 8471

Modified:
   trunk/mapbender/http/plugins/mb_overview.js
Log:
check if overview_wms is set correctly (afterInit)

Modified: trunk/mapbender/http/plugins/mb_overview.js
===================================================================
--- trunk/mapbender/http/plugins/mb_overview.js	2012-08-24 08:30:02 UTC (rev 8470)
+++ trunk/mapbender/http/plugins/mb_overview.js	2012-08-27 13:48:29 UTC (rev 8471)
@@ -73,11 +73,6 @@
 	
 	$this.data("isMap", true);
 	
-	cntWms = Mapbender.modules['mapframe1'].wms.length;
-	if(parseInt(cntWms,10)-1 < options.overview_wms) {
-		alert("Overview index wms error. Please check element var 'overview_wms' of application element overview.");
-	}
-
 	$this.mapbender(new Mapbender.Map({
 		id: options.id, 
 		width: options.width, 
@@ -140,6 +135,13 @@
 	ovWmsArray[0].gui_wms_visible = 1; 
 });
 
+Mapbender.events.afterInit.register(function () {
+	cntWms = Mapbender.modules['mapframe1'].wms.length;
+	if(parseInt(cntWms,10)-1 < options.overview_wms) {
+		alert("Overview index wms error. Please check element var 'overview_wms' of application element overview.");
+	}
+});
+
 //
 // update the rectangle indicating the current extent 
 // of the target map after each map request in the target



More information about the Mapbender_commits mailing list