[Mapbender-commits] r2499 - branches/beck_dev/mapbender/lib
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Jun 11 05:18:00 EDT 2008
Author: christoph
Date: 2008-06-11 05:18:00 -0400 (Wed, 11 Jun 2008)
New Revision: 2499
Modified:
branches/beck_dev/mapbender/lib/core.js
Log:
set querylayers etc before featureinfo request...only temporary
Modified: branches/beck_dev/mapbender/lib/core.js
===================================================================
--- branches/beck_dev/mapbender/lib/core.js 2008-06-11 08:30:28 UTC (rev 2498)
+++ branches/beck_dev/mapbender/lib/core.js 2008-06-11 09:18:00 UTC (rev 2499)
@@ -31,7 +31,54 @@
* Triggered before a feature info is requested.
*/
var eventBeforeFeatureInfo = new MapbenderEvent();
+eventBeforeFeatureInfo.register(function() {
+ for (var j=0; j<mb_mapObj.length; j++) {
+ var mapObj = mb_mapObj[j];
+ //
+ // set list of visible layers, active querylayers
+ // and styles for each WMS in this map
+ //
+
+ var cnt_layers;
+ var cnt_querylayers;
+ var styles;
+ var layers;
+ var querylayers = "";
+ for(i=0; i< mapObj.wms.length; i++){
+ cnt_layers = 0;
+ cnt_querylayers = 0;
+ styles = "";
+ layers = "";
+ querylayers = "";
+
+ for(var ii=0; ii<mapObj.wms[i].objLayer.length; ii++){
+ // layer is visible and not root layer
+ if(mapObj.wms[i].objLayer[ii].gui_layer_visible == 1 && ii>0){
+ if(cnt_layers > 0){
+ layers += ","; styles += ",";
+ }
+ layers += wms[i].objLayer[ii].layer_name;
+ styles += "";
+ cnt_layers++;
+ }
+ // layer is queryable and not root layer
+ if(mapObj.wms[i].objLayer[ii].gui_layer_querylayer == 1 && ii>0){
+ if(cnt_querylayers > 0){
+ querylayers += ",";
+ }
+ querylayers += wms[i].objLayer[ii].layer_name;
+ cnt_querylayers++;
+ }
+ }
+ mapObj.layers[i] = layers;
+ mapObj.styles[i] = styles;
+ mapObj.querylayers[i] = querylayers;
+ }
+
+ }
+
+});
/**
* Triggered after a WMS has been loaded.
*/
More information about the Mapbender_commits
mailing list