Bug report #13457

WMS GetPrint request doesn't render legend when it's assigned to map

Added by Marcin Gontarek almost 5 years ago. Updated over 3 years ago.

Status:Closed
Priority:High
Assignee:-
Category:QGIS Server
Affected QGIS version:2.10.1 Regression?:No
Operating System:Linux Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:21504

Description

Standard GetMap request:

http://gontar.local/cgi-bin/qgis_mapserv.fcgi?MAP=/home/gontar/qgis_server/test_proj.qgs&
SERVICE=WMS&
VERSION=1.3.0&
REQUEST=GetMap&
CRS=EPSG:4326&
BBOX=1,1,2,2&
FORMAT=image/png&
LAYERS=polygons&
WIDTH=500&
HEIGHT=500

Vaild image
result: http://imgur.com/ykR3VgD

Valid GetPrint request with legend assigned to "Map0":

http://gontar.local/cgi-bin/qgis_mapserv.fcgi?MAP=/home/gontar/qgis_server/test_proj.qgs&
SERVICE=WMS&
VERSION=1.3.0&
REQUEST=GetPrint&
CRS=EPSG:4326&
map0:EXTENT=1,1,2,2&
FORMAT=image/png&
LAYERS=polygons&
TEMPLATE=Comp1

or

http://gontar.local/cgi-bin/qgis_mapserv.fcgi?MAP=/home/gontar/qgis_server/test_proj.qgs&
SERVICE=WMS&
VERSION=1.3.0&
REQUEST=GetPrint&
CRS=EPSG:4326&
map0:EXTENT=1,1,2,2&
FORMAT=image/png&
LAYERS=polygons&
TEMPLATE=Comp1&
BBOX=1,1,2,2&
LAYERS=polygons&
WIDTH=500&
HEIGHT=500

Image with valid map section but without legend rendered
result: http://imgur.com/xjvEHww

Valid GetPrint request with legend assigned to "None":

http://gontar.local/cgi-bin/qgis_mapserv.fcgi?MAP=/home/gontar/qgis_server/test_proj.qgs&
SERVICE=WMS&
VERSION=1.3.0&
REQUEST=GetPrint&
CRS=EPSG:4326&
map0:EXTENT=1,1,2,2&
FORMAT=image/png&
LAYERS=polygons&
TEMPLATE=Comp1

Image with valid map section but with legend rendered (doesn't respect map extent)
result: http://imgur.com/kXDFiBl

Valid GetPrint request with legend assigned to "Map0" and ma0:EXTEND invalid/blank value:

http://gontar.local/cgi-bin/qgis_mapserv.fcgi?MAP=/home/gontar/qgis_server/test_proj.qgs&
SERVICE=WMS&
VERSION=1.3.0&
REQUEST=GetPrint&
CRS=EPSG:4326&
map0:EXTENT=&
FORMAT=image/png&
LAYERS=polygons&
TEMPLATE=Comp1

result: http://imgur.com/qi8GNBB
Image without filed map but with valid legend

Tested on versions: 2.8.3, 2.10.1, master

qgis_server.zip (8.26 KB) Marcin Gontarek, 2015-09-30 02:00 AM

qgis_server_images.zip (155 KB) Marcin Gontarek, 2015-09-30 02:00 AM

History

#1 Updated by Marcin Gontarek almost 5 years ago

Poject files and images uploaded to imgur

#2 Updated by Jürgen Fischer almost 5 years ago

  • Subject changed from QGIS Server WMS GetPrint request don't render legend when it's assigned to map to WMS GetPrint request doesn't render legend when it's assigned to map

#3 Updated by Tom Palan over 4 years ago

I can confirm that linking to a map does not render the legend in 2.12.3 too

#4 Updated by Giovanni Manghi over 3 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

works as expected on 2.18.2, reopen if necessary.

Also available in: Atom PDF