[qgis-qwc2] GetMap request from QWC2 miss map-parameter

Thomas Schüttenberg thomas at qgis.de
Thu Mar 28 01:58:40 PDT 2019


Hi there!

I happily managed to set up a QGIS server (3.4.5), to compile and deploy the QWC2 (using $ git clone --recursive https://github.com/qgis/qwc2-demo-app.git, so I think it stems from the master branch from three days ago) and to configure my first qwc-theme from a simple .qgs with four PostGIS layers. Everything works: I get the QWC, it displays my theme showing the tools and the background layer and even the legend graphics are displayed. But the qgs-layers do not appear in the map! 

It is not a problem of accessibility of QGIS Server or the PostGIS database, because the QGIS Server WMS works e.g. in QGIS Desktop and also simple hand written getmap requests sent from the browser result in the requested image.

Further analyzing the network activity I found that the GetMap requests (and the GetFeatureInfo requests) sent by the QWC miss the MAP= parameter, which results in the (expectable) response: 400 (Bad Request): ServiceException code="LayerNotDefined" Layer "reinigung_erledigt" does not exist. 

For example, a GetMap request I get looks like this (picked from the qgis_server.log, the apache access.log or the network panel of the browser's devtools):
/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng%3B%20mode%3D8bit&TRANSPARENT=true&LAYERS=reinigung_erledigt%2Creinigung_anstehend%2Cinspektion_erledigt%2Cinspektion_anstehend&STYLES=&SRS=EPSG%3A31467&CRS=EPSG%3A31467&TILED=false&DPI=96&OPACITIES=255%2C255%2C255%2C255&WIDTH=966&HEIGHT=1009&BBOX=3487984.106813155%2C5790064.078502184%2C3498734.6512881704%2C5801293.166882401

Interestingly though the referer of this request does show the theme: t=reinigung_inspektion.qgs
http://nt440geo3:90/?bl=mapnik&st=&l=reinigung_erledigt%2Creinigung_anstehend%2Cinspektion_erledigt%2Cinspektion_anstehend&t=reinigung_inspektion.qgs&e=3487989%2C5790068%2C3498739%2C5801297

A GetLegendGraphic however request reads: 
/qgis/qgis_mapserv.fcgi.exe?MAP=D%3A%2FGEODaten%2Fqgis_ows%2Fqgs%2Freinigung_inspektion.qgs&&SERVICE=WMS&REQUEST=GetLegendGraphic&VERSION=1.3.0&FORMAT=image/png&LAYER=inspektion_anstehend&TYPE=thumbnail

I do not hope so, but this might be a bug if it is not the result of a misconfiguration. The last seems a bit more likely to me, because I am an absolute beginner in QWC2. So, any hint and help appreciated. :-)

Cheers!
Thomas


More information about the qgis-qwc2 mailing list