3liz / lizmap-web-client

Transfer a QGIS project on a server, Lizmap is providing the web interface to browse it
https://www.lizmap.com
Mozilla Public License 2.0
249 stars 141 forks source link

Only one map is printed #1605

Open pcav opened 4 years ago

pcav commented 4 years ago

If a project has a layout with two maps, only one is printed in Lizmap:

http://cis/index.php/lizmap/service/?repository=castelplanio&project=prg&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetPrint&FORMAT=pdf&EXCEPTIONS=application/vnd.ogc.se_inimage&TRANSPARENT=true&SRS=EPSG:3004&DPI=100&TEMPLATE=test2&map0:extent=2366048.305089,4817558.585494,2368048.353185,4820308.651625&map0:scale=25000&map0:LAYERS=Carta%20tecnica,PRG,confine&map0:STYLES=predefinito,predefinito,default&LAYERS=Carta%20tecnica,PRG,confine&STYLES=predefinito,predefinito,default&OPACITIES=255,255,255

whereas from the desktop both are printed:

test2.pdf

Tested on two different servers, QGIS 3.10.4 and 5, Lizmap 3.3.5.

rmarzocchi84 commented 4 years ago

http://cis/index.php/lizmap/service/?repository=castelplanio&project=prg&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetPrint&FORMAT=pdf&EXCEPTIONS=application/vnd.ogc.se_inimage&TRANSPARENT=true&SRS=EPSG:3004&DPI=100&TEMPLATE=test2&map0:extent=2366048.305089,4817558.585494,2368048.353185,4820308.651625&map0:scale=25000&map0:LAYERS=Carta%20tecnica,PRG,confine&map0:STYLES=predefinito,predefinito,default&LAYERS=Carta%20tecnica,PRG,confine&STYLES=predefinito,predefinito,default&OPACITIES=255,255,255

I cannot view the web project. Maybe is my problem

I read the answer of @rldhont in mailing list ( Lizmap always prints one map. It prints two maps if an overview map is defined.) but it is a lizmap or qgis server limitation?

Gustry commented 4 years ago

It's not your problem, the link http://cis/ I think it's to show us the URL parameters.

gioman commented 4 years ago

The above GetPrint request contains only the parameter for one map, map0. It has to be checked if adding the parameter for other maps it works, if it does not work then is a QGIS server limitation, not LM. If it works then LM should add the parameters for maps other than map0.

pcav commented 4 years ago

I removed the map following the explanation by @rldhont Apparently it's a LM limitation.

Alain-LG commented 4 years ago

Do you know when this problem will be resolved ? Or do you know an alternative solution ?

Gustry commented 2 years ago

FYI a bugfix in QGIS Server https://github.com/qgis/QGIS/pull/48952 in QGIS 3.22

Just to keep reference : #3025

nboisteault commented 2 weeks ago

Some work as been done to print a second map which is an overview of the first map. There was a regression. It will land in next 3.7 but can be tested right now. Doc has been updated too: https://docs.lizmap.com/next/en/publish/configuration/print.html#overview It would need some more work to print several maps with or without overviews.