[Mapbender-commits] r1235 - trunk/mapbender/http/html
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Mar 19 05:45:27 EDT 2007
Author: christoph
Date: 2007-03-19 05:45:26 -0400 (Mon, 19 Mar 2007)
New Revision: 1235
Modified:
trunk/mapbender/http/html/mod_treefolder.php
Log:
treefolder: on/off setting of wms is not cascaded down to layers
http://trac.osgeo.org/mapbender/ticket/17
Modified: trunk/mapbender/http/html/mod_treefolder.php
===================================================================
--- trunk/mapbender/http/html/mod_treefolder.php 2007-03-16 16:04:35 UTC (rev 1234)
+++ trunk/mapbender/http/html/mod_treefolder.php 2007-03-19 09:45:26 UTC (rev 1235)
@@ -109,15 +109,15 @@
parent.handleSelectedLayer_array(mapObj, mywms, mylayername, type, status);
}
function switchWMS(w,s){
- for(var i=0; i<parent.mb_mapObj.length; i++){
- if(parent.mb_mapObj[i].frameName == mod_treeGDE_map){
- for(var ii=0; ii<parent.mb_mapObj[i].wms.length; ii++){
- if(parent.mb_mapObj[i].wms[ii].wms_id == w){
- for(var iii=1; iii<parent.mb_mapObj[i].wms[ii].objLayer.length; iii++){
- if(parent.mb_mapObj[i].wms[ii].objLayer[iii].gui_layer_selectable == '1'){
+ for (var i=0; i < parent.mb_mapObj.length; i++) {
+ if (parent.mb_mapObj[i].frameName == mod_treeGDE_map) {
+ for (var ii=0; ii < parent.mb_mapObj[i].wms.length; ii++){
+ if (parent.mb_mapObj[i].wms[ii].wms_id == w){
+ for (var iii=1; iii < parent.mb_mapObj[i].wms[ii].objLayer.length; iii++) {
+ if (parent.mb_mapObj[i].wms[ii].objLayer[iii].gui_layer_selectable == '1') {
parent.mb_mapObj[i].wms[ii].objLayer[iii].gui_layer_visible = s;
}
- if(parent.mb_mapObj[i].wms[ii].objLayer[iii].gui_layer_queryable == '1'){
+ if (parent.mb_mapObj[i].wms[ii].objLayer[iii].gui_layer_queryable == '1') {
//parent.mb_mapObj[i].wms[ii].objLayer[iii].gui_layer_querylayer = s;
}
}
@@ -245,7 +245,7 @@
for ( var i=1; i<idx; i++ )
{
// linked Name ?
- if ( treeUrl[i] != '' ){
+ if ( treeUrl[i] != null ) {
linkedName = "<input id='"+treeShortname[i]+"###"+treeWMS[i]+"###visible###' type='checkbox' ";
if(treeVisible[i] == '1'){ linkedName += "checked ";}
@@ -279,7 +279,9 @@
linkedName += '<A id="'+treeShortname[i]+'_'+treeWMS[i];
if (metadatalink == 'true'){
- linkedName += '" HREF="' + treeUrl[i];
+ if (treeUrl[i] !== false) {
+ linkedName += '" HREF="' + treeUrl[i];
+ }
}
// linkedName += '" HREF="../php/mod_layerMetadata.php?id=' + ;
@@ -595,7 +597,7 @@
var temp = parent.mb_mapObj[i].wms[ii].objLayer[iii];
if(parent.mb_mapObj[i].wms[ii].objLayer[iii].layer_parent == ""){
//alert((parseInt(temp.layer_id)+1) + " , " +0 + " , " +temp.layer_title + " , " +" , "+temp.layer_metadataurl);
- Note((parseInt(temp.layer_id)+1),0,temp.layer_title,'','','','','',parent.mb_mapObj[i].wms[ii].wms_id,'');
+ Note((parseInt(temp.layer_id)+1),0,temp.layer_title,null,'','','','',parent.mb_mapObj[i].wms[ii].wms_id,'');
parentObj = temp.layer_id+1;
}
if(parent.mb_mapObj[i].wms[ii].objLayer[iii].layer_parent == "0"){
@@ -606,7 +608,7 @@
Note((parseInt(temp.layer_id)+1),parentObj,temp.layer_title,'../php/mod_layerMetadata.php?id='+temp.layer_uid,temp.gui_layer_selectable,temp.gui_layer_visible,temp.gui_layer_queryable,temp.gui_layer_querylayer,parent.mb_mapObj[i].wms[ii].wms_id,temp.layer_name);
}
else {
- Note((parseInt(temp.layer_id)+1),parentObj,temp.layer_title,'',temp.gui_layer_selectable,temp.gui_layer_visible,temp.gui_layer_queryable,temp.gui_layer_querylayer,parent.mb_mapObj[i].wms[ii].wms_id,temp.layer_name);
+ Note((parseInt(temp.layer_id)+1),parentObj,temp.layer_title,false,temp.gui_layer_selectable,temp.gui_layer_visible,temp.gui_layer_queryable,temp.gui_layer_querylayer,parent.mb_mapObj[i].wms[ii].wms_id,temp.layer_name);
}
}
}
More information about the Mapbender_commits
mailing list