Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

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

share|improve this answer

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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