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",
                {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?

2 Answers 2


For a wms layer, you have to specify available resolutions, i.e. zoom levels. Add this to your options object for the wms layer:

resolutions: [1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125]

Note, this only covers a few zoom levels, you should google for the full resolutions array which contains 18 standard zoom levels/resolutions, or more if neccessary


I addition to U2ros's answer I would add srsName: "EPSG:4326", to your protocol options

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.