I'm trying to overlay a WMS layer over GoogleMaps base one. The WMS layer is defined like this:
var catastro_layer = new OpenLayers.Layer.WMS(
"WMS Catastro",
http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?SERVICE=WMS&VERSION=1.1.1,
{
layers: "catastro",
format:"image/png",
srs: "EPSG:3785",
transparent: false
}
);
GoogleMaps layers are defined just like here http://openlayers.org/blog/2010/07/10/google-maps-v3-for-openlayers/.
As result, my WMS layer appears as one base layer more. So, I can select it instead of the other base layers, not over them. This screenshots shows what I mean: http://dl.dropbox.com/u/6599273/capa_wms1.png
The WMS requests are ok:
But this isn't what I need. I want a GoogleMaps base layer and a transparent WMS overlay.
Now, if I change the WMS layer defintion replacing transparent: false by transparent: true:
var catastro_layer = new OpenLayers.Layer.WMS(
"WMS Catastro",
http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?SERVICE=WMS&VERSION=1.1.1,
{
layers: "catastro",
format:"image/png",
srs: "EPSG:3785",
transparent: true
}
);
My WMS layer appears as a overlay: http://dl.dropbox.com/u/6599273/capa_wms2.png, just what I want.
But now, the requests are incorrect:
As you can see, the epsg:3785 has been replaced by epsg:900913. But the only change I've made is "transparent: false" by "transparent: true". Why is this happening?
Many thanks in advance, and best regards