i have the following code on my html file:
// World Geodetic System 1984 projection
var WGS84 = new OpenLayers.Projection("EPSG:4326");
// WGS84 Google Mercator projection
var WGS84_google_mercator = new OpenLayers.Projection("EPSG:900913");
// create a map panel with some layers that we will show in our layer tree
// below.
layers = [];
layers.push(new OpenLayers.Layer.Google("Google Maps", {
numZoomLevels: 20
, 'sphericalMercator' : true
}
));
layers.push(new OpenLayers.Layer.WMS(
"National Parks", "http://localhost:8080/geoserver/wms", {
srs: 'EPSG:4326',
layers: 'National_Parks',
format: 'image/png',
buffer:0
}, {
'isBaseLayer': false
}
));
map = new OpenLayers.Map({
allOverlays: false // If it is true then both the wms and the map layers will be included under the "Overlays" folder
});
mapPanel = new GeoExt.MapPanel({
region: "center",
center: new OpenLayers.Bounds(-16.08,49.06,6.76,58.74).transform(WGS84, map.getProjectionObject()),
zoom: 2,
map: map
});
map.addLayers(layers);
As the code is at the moment i can see the googlemaps layer at full extent (although i wanted it zoomed in at these boundaries -16.08,49.06,6.76,58.74) but i can not see the national parks wms layer.
What i did was to add 'displayOutsideMaxExtent':true next to 'isBaseLayer': false on the wms properties. When i did that i could see tha wms layer on all zoom levels but i couldnt see googlemaps at all. when i was zooming in and out the googlemaps layer was appearing instantly and then it was going off.
Does anyone have any idea where the problem might be?
I am using Geoserver, Openlayers, GeoExt and ext.
Thanks

