[Mapbender-commits] r7511 - branches/2.7/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Feb 1 15:07:43 EST 2011


Author: marc
Date: 2011-02-01 12:07:43 -0800 (Tue, 01 Feb 2011)
New Revision: 7511

Modified:
   branches/2.7/http/javascripts/mod_addWMSfromfilteredList_ajax.php
Log:
#761

Modified: branches/2.7/http/javascripts/mod_addWMSfromfilteredList_ajax.php
===================================================================
--- branches/2.7/http/javascripts/mod_addWMSfromfilteredList_ajax.php	2011-02-01 13:33:40 UTC (rev 7510)
+++ branches/2.7/http/javascripts/mod_addWMSfromfilteredList_ajax.php	2011-02-01 20:07:43 UTC (rev 7511)
@@ -451,18 +451,17 @@
 			setTableHeader(selectWmsText, wmsNameText, wmsAbstractText);
 
 			for (var i = 0; i < wmsArray.length; i++) {
-
 				if (global_source == "db" && typeof(guiId) !== "undefined" ) {
 					var onClick = "parent.mod_addWMSById_ajax(" +
 						"'" + guiId + "', '" + wmsArray[i].id + "', {" +
 							"callback: function (opt) {" +
 								"if (typeof opt === 'object' && opt.success) {" +
 									"var wmsId = parseInt(opt.wmsId, 10);" +
-									"var map = getMapObjByName('<?php echo $e_target[0]; ?>');" +
-									"handleSelectedWms(map.elementName, wmsId, 'visible', 0);" +
-									"handleSelectedWms(map.elementName, wmsId, 'querylayer', 0);" +
+									"var map = parent.getMapObjByName('<?php echo $e_target[1]; ?>');" +
+									"parent.handleSelectedWms(map.elementName, wmsId, 'visible', 0);" +
+									"parent.handleSelectedWms(map.elementName, wmsId, 'querylayer', 0);" +
 								"}" +
-								"loadWmsCallback(opt);}});";
+								"loadWmsAndZoomCallback(opt);}});";
 				}
 				else {
 					var onClick = "mod_addWMSfromfilteredList(\"" +
@@ -470,7 +469,7 @@
 					wmsArray[i].version+"\", {" +
 					"zoomToExtent: 0, " +
 					"visible: 0, " +
-					"callback: loadWmsCallback" +
+					"callback: loadWmsAndZoomCallback" +
 					"});";
 				}
 				addTableRow(wmsArray[i].title, wmsArray[i].abstract, onClick);



More information about the Mapbender_commits mailing list