[Mapbender-commits] r3903 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Apr 21 11:11:03 EDT 2009


Author: christoph
Date: 2009-04-21 11:11:02 -0400 (Tue, 21 Apr 2009)
New Revision: 3903

Modified:
   trunk/mapbender/http/javascripts/map_obj.js
Log:
added 
* ignoreWMS array to featureInfo request
* event afterMapRequest

Modified: trunk/mapbender/http/javascripts/map_obj.js
===================================================================
--- trunk/mapbender/http/javascripts/map_obj.js	2009-04-21 10:01:35 UTC (rev 3902)
+++ trunk/mapbender/http/javascripts/map_obj.js	2009-04-21 15:11:02 UTC (rev 3903)
@@ -250,6 +250,7 @@
 	domElement.style.width = this.width;
 	domElement.style.height = this.height;   
    
+	this.afterMapRequest = new MapbenderEvent();
 	
 	/**
 	 * get the extent of the mapObj
@@ -628,14 +629,25 @@
 	 * @return array of all featureInfoRequests of this map object
 	 * @type string[]
 	 */
-	this.getFeatureInfoRequests = function(clickPoint){
+	this.getFeatureInfoRequests = function(clickPoint, ignoreWms){
 		var allRequests = [];
 		//loop through all wms to get the FeatureInfoRequests
 		for (var i = 0; i < this.wms.length; i++) {
-			var currentRequest = this.wms[i].getFeatureInfoRequest(this, clickPoint);
-			if (currentRequest) {
-				allRequests.push(currentRequest);
+			var ignoreThisWms = false;
+			if (ignoreWms.constructor === Array) {
+				for (var j = 0; j < ignoreWms.length; j++) {
+					if (ignoreWms[j] == this.wms[i].wms_id) {
+						ignoreThisWms = true;
+						break;
+					}
+				}
 			}
+			if (!ignoreThisWms) {
+				var currentRequest = this.wms[i].getFeatureInfoRequest(this, clickPoint);
+				if (currentRequest) {
+					allRequests.push(currentRequest);
+				}
+			}
 		}
 		if (allRequests.length > 0) {
 			return allRequests;
@@ -813,6 +825,7 @@
 			"map": this,
 			"myMapId": myMapId.join(",")
 		});
+		this.afterMapRequest.trigger();
 	};
 
 	var that = this;



More information about the Mapbender_commits mailing list