[Mapbender-users] implement "layer conflicts" - mod_treefolder2.php

Karsten Vennemann karsten at TERRAGIS.NET
Thu Apr 10 18:25:57 EDT 2008


Three more questions

>> >> What would be the best way/ a way to uncheck the checkbox using java
>> >> script in the tree ?

>> There is a function
>> checkNode(path, ctrlNr, bChk) in jsTree.js
>> path should be something like 
>> arrNodes[0][0]+"|"+parent.mb_mapObj[map].wms[wms].wms_id
>> ctrlNr is the number of the input control (0 for gui_layer_visible and 1 
>> for gui_layer_quaryable)
>> bChk is either true or false
>> This function also fires the onclick event of the control

Thanks that works for all layers of the wms using 
arrNodes[0][0]+"|"+parent.mb_mapObj[map].wms[wms].wms_id

and for individual layers using
mypath =
arrNodes[0][0]+"|"+parent.mb_mapObj[0].wms[0].objLayer[layernumber].layer_name; 

Now to switch a layer(s) off one can use

if(fc.checked==true){
    fc.checked = false;
    if(fc.onclick)fc.onclick();
}

This work gerat except that it uses the onclick event for the checkbox to
switch it off. Thus if a lot off 

layers will need to be switched off it generates a lot of imagerequests
which could possibly take some time and are ineffective.

1) How could I only fire one redraw request for the wms/map after switching
off several layers?  

2) On a different topic:
In treeGDe2 is there a way to wrap long layer titles in the tree in order
that one can read the whole title in two lines instead of using scroll bars?
>From what I can tell using Firebug it seems that table cells containing the
title text have a <td nowrap> attribute. I found something like it also in
jsTree.js
code.push(' alt=""></td><td nowrap>'....
But if I delete that there the tree still has that attribute. Does it make
sens to take that attribute out somehow or is there another way to enable
wrapping?
For the Legend it seems that wrapping is  done automatically for title
text...

3) Is the a method or function to determine the layer_id of a layer if you
have the layers name on the client side?

Cheers
Karsten Vennemann
-- 
View this message in context: http://www.nabble.com/implement-%22layer-conflicts%22---mod_treefolder2.php-tp16557855p16620357.html
Sent from the mapbender-users mailing list archive at Nabble.com.



More information about the Mapbender_users mailing list