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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Apr 16 04:04:08 EDT 2009


Author: verenadiewald
Date: 2009-04-16 04:04:08 -0400 (Thu, 16 Apr 2009)
New Revision: 3879

Modified:
   branches/2.6/http/javascripts/map_obj.js
Log:
new function mb_mapObj_const.prototype.getWfsConfIds for getting all wfs conf ids belonging to wms layers

Modified: branches/2.6/http/javascripts/map_obj.js
===================================================================
--- branches/2.6/http/javascripts/map_obj.js	2009-04-15 13:00:04 UTC (rev 3878)
+++ branches/2.6/http/javascripts/map_obj.js	2009-04-16 08:04:08 UTC (rev 3879)
@@ -927,3 +927,28 @@
 
 	eventAfterMapObjectConstruction.trigger();
 }
+
+mb_mapObj_const.prototype.getWfsConfIds = function (wfs_config) {
+	var db_wfs_conf_id = [];
+	var js_wfs_conf_id = [];
+	
+	//search configurations that are selected (and in scale)
+	for (var i=0; i < this.wms.length; i++){
+		for(var ii=0; ii < this.wms[i].objLayer.length; ii++){
+			var o = this.wms[i].objLayer[ii];
+			if(o.gui_layer_wfs_featuretype != '' && o.gui_layer_querylayer == '1'){
+				if(!checkscale || o.checkScale(this))
+					db_wfs_conf_id[db_wfs_conf_id.length] = o.gui_layer_wfs_featuretype;
+			}
+		}
+	}
+	for(var i=0; i < db_wfs_conf_id.length; i++){
+		for(var ii=0; ii < wfs_config.length; ii++){
+			if(wfs_config[ii]['wfs_conf_id'] == db_wfs_conf_id[i]){
+				js_wfs_conf_id[js_wfs_conf_id.length] = ii;
+				break;
+			}
+		}
+	}	
+	return js_wfs_conf_id;
+};
\ No newline at end of file



More information about the Mapbender_commits mailing list