I'm trying to setup a map with WMS and WFS Layers by using Geoserver. However, when I'm combining WFS and WMS (with some Google basemaps) together in one map I got following error in Firebug: TypeError: this.resolutions is undefined which is located in the http://openlayers.org/dev/OpenLayers.js JS-file Then I can see the WFS layer but not the WMS layer, furthermore also navigating in the map becomes very difficult...
The WFS Layer look like this:
var tracks = new OpenLayers.Layer.Vector("Tracks", {
strategies: [new OpenLayers.Strategy.BBOX()],
styleMap: style,
protocol: new OpenLayers.Protocol.WFS({
version: "1.1.0",
url: "http://localhost:8080/geoserver/wfs",
featureNS: "http://shapes.net/shapes",
featureType: "tracks",
geometryName: "the_geom",
})
});
Well, thise works quite good but as soon as I'm adding also a WMS Layer into the map i got the Error
var corine = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0",
{layers: 'basic'} );
It doesn't matter if I take a WMS from my Geoserver or from an other external source (like in the code here), I always got the error when I'm activating this layer.
Btw. if the layers are not combined the works fine...
My assumption is that there could be a problem with the projection. Both layers are defined in Geoserver with EPSG:4326.
In the init.js
I'm using this projects here:
projection: new OpenLayers.Projection("EPSG:4326"),
displayProjection: new OpenLayers.Projection("EPSG:900913"),
Any ideas?