Thanks Andreas for your suggestion, I believe this is exactly what I need but
unfortunately I could never get their code to work with my own. I just can't
figure out how to change my existing layertree/layercontainer to show all
the individual layers under my one WMS group layer. I tried to look at the
example tree.js and modify mine but I just get syntax errors, can't figure
out where to insert their LayerNodeUI / treeCOnfig parts. My layer was
declared as a WMS named "All Layers" which has each layer added to it that
was previously a single WMS layer. I obviously have to add the layerparams
somewhere below just not sure exactly where. Any help very appreciated.
My existing code -
var layer_All = new OpenLayers.Layer.WMS("All Layers",
"http://ITS701X5J1/RedWMS/Request.aspx",
{
layers: ['BAS_GRID_SECTION_SHAPE,Overview_Streets,
Quadrant_Streets, Neighbourhood_Streets, Block_Streets, Proposed_Streets,
PTMC_Address_label_major],
transparent: true
},
{ isBaseLayer: true,
displayInLayerSwitcher: true,
singleTile: true
}
);
//Define Hidden MapPanel for use with GeoExt
var mapPanel = new GeoExt.MapPanel({
renderTo: '',
height: 0,
width: 0,
map: map,
title: 'A Simple GeoExt Map',
bbar: [zoomSelector]
});
//Labels LayerList
var layerList_All = new GeoExt.tree.LayerContainer({
text: 'All Layers',
layerStore: mapPanel.layers,
leaf: false,
cls: 'rootnode',
enableDD: true,
expanded: false,
loader:
{
filter: function(record)
{
var myarr = new Array();
myarr[0] = record.get("layer").name.indexOf("All Layers");
if(myarr[0]==-1)
{
return false;
}
else
{
return true;
}
}
}
});
//declare root tree node
var layerRoot = new Ext.tree.TreeNode({
enableDD: true,
text: "All Legend Items",
expanded: true
});
//add children to root node
layerRoot.appendChild(layerList_All)
var layerTree = new Ext.tree.TreePanel({
title: '',
renderTo: 'legend',
root: layerRoot,
enableDD: true,
applyLoader: true,
rootVisible: false
});
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/Can-I-speed-up-OpenLayers-WMS-without-using-Tilecache-tp5527315p5527825.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users