I've managed to create a WMS feed from Mapserver showing a tile index to some rasters and a shapefile and it appears in my browser OK. If I go to QGIS (1.8.0 Windows StandAlone) and I connect to my WMS feed I can see the layer names appear in the dialog box. However when I add the layers to the map I don't see any layers. I tried zooming to them etc but nothing is visible on the screen.

Does anyone have any ideas why this might be?

  • 1
    Can you share the URL of the service? I recently created many WMS/WFS/WCS services with both Mapserver and QGIS server and I didn't find any issue to consume them under QGIS Desktop. My feel is that you probably will need to tweak somewhere your Mapfile. – Giovanni Manghi Aug 10 '12 at 12:13
  • This is an internal webserver and sits behind the firewall so I cant expose the url to you. Sorry. – geosmiles Aug 10 '12 at 13:58
  • Then I cannot help you. Have a look to the examples mapfiles for WMS servers in the Mapserver documentation, they work well. – Giovanni Manghi Aug 12 '12 at 8:37


It could be a projection issue, it could be some error with the data, or the map file (local URLs for public services), it could be that QGIS is sending a malformed request, it could be choice of output format etc. You said that the feed appears OK in your browser but you didn't quantify what that actual means. To help GIS.SE problem solvers help to debug the problem you might post example requests that work for you in a browser and some images/output of what the output should be, and some screen shot of the same service not working in QGIS etc. You mention the version of QGIS but not the version of MapServer; to get someone else to help solve the problem or at least tell you where to look you need to post as much detail as possible (redacted if necessary if you data is sensitive)...


So as mentioned in the comment there isn't enough detail in the question to point you to a solution, so this is more of a quick guide to help you (and others in the same situation) work out what might be going wrong.

Before you start looking for the blame in QGIS (or OpenLayers, your code, other GIS clients..) the first thing you need to do, is work out if your service (feed) is actually working correctly (as expected).


One way to help is to turn on debugging in MapServer, fire off some requests in the browser and look at the logs.


    CONFIG "MS_ERRORFILE" "/some/file/for-errors.txt"
    DEBUG 3


    DEBUG 3

Debugging levels are 0 to 5 but level 3 should probably be sufficient for most data / map file issues.


As someone who occasionally has to check WMS services provided by external parties (as part of a help desk function), the first thing I do is to look at the GetCapabilities response.


which reports the highest version supported or to specify a specific version like:


I do a manual scan of the output, obviously if the output is some error then... but if you get big XML document, then I look at all the URLs reported to see that they are all public, or contain no oddities. You should for example get a full URL for the Legend, which you can cut and paste into a browser.

  <LegendURL width="105" height="124">

Does this work, if not what do the logs report?

Another thing you can do is take the XML GetCapabilities response and put it into an XML parser and check that the response is both well formed and valid.


You can check whether you can create a map by constructing a query using the CGI variable mode=map&. This isn't a test of the OGC WMS functionality, but a test that MapServer can see the data, something like:


Do you get a map, if not what do the logs report?


Eventually though you will need to construct a GetMap request, you can do this manually, or you can use a client such as QGIS; this is before we look too closely at whether QGIS is working correctly, but just to give us a quick way of constructing a GetMap request, that is, getting hold of of the actual request that was sent so we could try it again in a browser; because sometimes the client will happily mask the errors that occur, and we want the actual response direct from the service.

So you will need some client such as QGIS, and some utility like Fiddler

Add your service into QGIS as you normally do and add the layers of interest.

Start Fiddler

Then in QGIS go to Settings > Options > Network > Use proxy for web access and tick the box (accept the default settings)

Now you do some zooming and panning in the map (even if it's blank) to generate the GetMap requests and perhaps you can use the information tool to click on the map to generate some GetFeatureInfo requests.

Now go to Fiddler and look at all the requests that were generated. Copy these into a browser and fire off the requests again, do you get errors?


If the requests work natively but you don't get a map in QGIS, try in other clients, if everything works except in QGIS then it's probably a QGIS problem. Otherwise it may be an issue with the interpretation of the OGC standard...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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