Hi,
I've come across a potential problem in GeoExt.tree.LayerParamLoader :
When loading a group layer with parameter CLASS and you have an ascending order
of classes, it displays them in opposite order, so one has to turn it around. I
looked into the source code and found this:
addParamNode: function(paramItem, allParamItems, node) {
var child = this.createNode({
layer: node.layer,
param: this.param,
item: paramItem,
allItems: allParamItems,
delimiter: this.delimiter
});
var sibling = node.item(0);
if(sibling) {
node.insertBefore(child, sibling);
} else {
node.appendChild(child);
}
},
Why not:
addParamNode: function(paramItem, allParamItems, node) {
var child = this.createNode({
layer: node.layer,
param: this.param,
item: paramItem,
allItems: allParamItems,
delimiter: this.delimiter
});
var sibling = node.item(0);
node.appendChild(child);
},
Which seems to work fine for me with a group layer. While I'm at it: I'm
writing a class called GroupLayerNode and was thinking of contributing it to
GeoExt, since I saw other people having this issue. My current implementation
loads each class as a separate layer. Although this is more overhead when all
layers are turned on, it seems more usable since when you turn off a class it
does not reload. I also put in there some logic to show a legend icon next to
the node in the tree. Please let me know if you would like the source code of
this class.
Cheers,
Tim
________________________________
Please consider the environment before printing this email
Warning: This electronic message together with any attachments is confidential.
If you receive it in error: (i) you must not read, use, disclose, copy or
retain it; (ii) please contact the sender immediately by reply email and then
delete the emails.
The views expressed in this email may not be those of Landcare Research New
Zealand Limited. http://www.landcareresearch.co.nz
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users