i have been developing webgis application that requires around 45 different layers served from geoserver. I had created openlayers wms layers and added them to geoext, everything works fine till the 35 th layer after i add 36th layer then openlayers gives pink tiles.
Here is my snippet:
WGS84 = new OpenLayers.Projection("EPSG:4326");
WGS84_google_mercator = new OpenLayers.Projection("EPSG:900913");
map = new OpenLayers.Map({
height: '300px',
// allOverlays:true,
width: '500px',
projection: WGS84_google_mercator, displayProjection: WGS84,
maxExtent: new OpenLayers.Bounds(80.0509262084961, 26.348379135131836, 88.20467376708984, 30.4458065032959).transform(new OpenLayers.Projection("EPSG:4326"), WGS84_google_mercator),
// )
controls: [
new OpenLayers.Control.Navigation(),
new OpenLayers.Control.ArgParser(),
new OpenLayers.Control.Attribution()
]
});
nnt_dyear_child_layer=new OpenLayers.Layer.WMS("Child Death Rate Yearly",
"hostname1/geoserver/wms", {
name: 'nnt_indicator_d',
layers: "vpdms:nnt_dyear-child", transparent: true,
//viewparams: a,
}, {
layerid: 'nnt_dyear-child_layer',
singleTile: true,
visibility: false,
group: "Indicators/NNT"
});
nnt_dweek_child_layer=new OpenLayers.Layer.WMS("Child Death Rate Weekly",
"hostname1/geoserver/wms", {
name: 'nnt_indicator_d',
layers: "vpdms:nnt_dweek-child", transparent: true,
//viewparams: a,
}, {
layerid: 'nnt_dweek-child_layer',
singleTile: true,
visibility: false,
group: "Indicators/NNT"
});
map.addLayers([nnt_dweek_child_layer,nnt_dyear_child_layer]);
and finally a geoext tree to hold the layer list:
tree1 = new GeoExt.ux.tree.LayerTreeBuilder({
region: "west",
// title: "Layers",
renderTo: 'layers',
width: 240,
height:200,
autoScroll: true,
rootVisible: false,
lines: false,
enableDD :true,
// widget custom properties
wmsLegendNodes: true,
vectorLegendNodes: true
});
I have used google base layers. I'm using openlayers 2.11 and geoext 2
Btw i have already read Here and Official Here
Any help would be great.
Thanks,
Bishrant Adhikari