[Users] wms getlegend mine type trouble in TreePanel
karsten
karsten at terragis.net
Mon Jan 23 20:07:32 CET 2012
Thanks for the hint.
I tried to configure this correctly but I am still not sure where the
baseParmas need to be added because I have a tree instead of a stand alone
legend ... Below is my code - any hints where I need to put the baseparams
to make it work - I tried multiple different configurations wihout
success...
tree = new Ext.tree.TreePanel({
title: "Capas Mapa",
id: 'TreePanel',
useArrows: true,
animate: true,
autoScroll: true,
enableDD: true,
collapsed: false,
collapsible: true,
// apply the tree node component plugin to layer nodes
plugins: [{
ptype: "gx_treenodecomponent"
}],
loader: {
applyLoader: false,
uiProviders: {
"custom_ui": LayerNodeUI
}
},
root: {
expand: true,
children: [{
nodeType: "gx_baselayercontainer",
text: 'Capas Bascios',
expanded: false
}, {
nodeType: "gx_overlaylayercontainer",
text: 'Capas Mapa',
expanded: true,
loader: {
baseAttrs: {
uiProvider: "custom_ui"
},
createNode: function (attr) {
// add a WMS legend to each node created
if
(GeoExt.WMSLegend.supports(mapPanel.layers.getByLayer(attr.layer))) {
attr.component = {
xtype: "gx_wmslegend",
layerRecord:
mapPanel.layers.getByLayer(attr.layer),
showTitle: false,
// custom class for css positioning
// see tree-legend.html
cls: "legend"
};
}
return
GeoExt.tree.LayerLoader.prototype.createNode.call(this, attr);
}
}
}]
},
rootVisible: false,
lines: false //,
// expand: true,
});
=======
Email scanned by PC Tools - No viruses or spyware found.
(Email Guard: 9.0.0.888, Virus/Spyware Database: 6.19110)
http://www.pctools.com/
=======
More information about the Users
mailing list