[Mapbender-commits] r4989 - branches/2.6/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Nov 16 05:10:10 EST 2009


Author: verenadiewald
Date: 2009-11-16 05:10:02 -0500 (Mon, 16 Nov 2009)
New Revision: 4989

Modified:
   branches/2.6/http/javascripts/map_obj.js
   branches/2.6/http/javascripts/wms.js
Log:
possibility to add a vendor specific to getFeatureInfoRequest

Modified: branches/2.6/http/javascripts/map_obj.js
===================================================================
--- branches/2.6/http/javascripts/map_obj.js	2009-11-13 13:50:11 UTC (rev 4988)
+++ branches/2.6/http/javascripts/map_obj.js	2009-11-16 10:10:02 UTC (rev 4989)
@@ -648,6 +648,7 @@
 		// add vendor-specific
 		for (var v = 0; v < mb_vendorSpecific.length; v++) {
 			var functionName = 'setMapRequest';
+			var currentWms_wms_title = currentWms.wms_title;
 			var vendorSpecificString = eval(mb_vendorSpecific[v]);
 			// if eval doesn't evaluate a function, the result is undefined.
 			// Sometimes it is necessary not to evaluate a function, for

Modified: branches/2.6/http/javascripts/wms.js
===================================================================
--- branches/2.6/http/javascripts/wms.js	2009-11-13 13:50:11 UTC (rev 4988)
+++ branches/2.6/http/javascripts/wms.js	2009-11-16 10:10:02 UTC (rev 4989)
@@ -220,6 +220,25 @@
 	if(mb_feature_count > 0){             
 		rq += "&FEATURE_COUNT="+mb_feature_count;
 	}
+	
+	rq += "&";
+	// add vendor-specific
+	for (var v = 0; v < mb_vendorSpecific.length; v++) {
+		var functionName = 'setFeatureInfoRequest';
+		var currentWms_wms_title = this.wms_title;
+		var vendorSpecificString = eval(mb_vendorSpecific[v]);
+		// if eval doesn't evaluate a function, the result is undefined.
+		// Sometimes it is necessary not to evaluate a function, for
+		// example if you want to change a variable from the current
+		// scope (see mod_addSLD.php) 
+		if (typeof(vendorSpecificString) != "undefined") {
+			rq += vendorSpecificString + "&";
+			if (this.wms_title == removeLayerAndStylesAffectedWMSTitle) {
+				rq = url.replace(/LAYERS=[^&]*&/, '');
+				rq = url.replace(/STYLES=[^&]*&/, '');
+			}
+		}
+	}
 	return rq;
 };
 



More information about the Mapbender_commits mailing list