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
252 stars 141 forks source link

Graticule labels are not being printed for all maps #1595

Closed NyakudyaA closed 1 year ago

NyakudyaA commented 4 years ago

Problem

I have deployed lizmap using docker-compose and when I try to print the map. I get a map with no graticule values.

graticule

In the QGIS composer, these values are visible

qgis-composer

Whilst debugging I noticed the example of a request that is being generated for each print request specifies the parameter

map0:grid_interval_x=10000&map0:grid_interval_y=10000

In QGIS Server get print parameters this parameter is optional.

Example Request https://foo.bar.com/index.php/lizmap/service/?repository=topographic&project=topomaps&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetPrint&FORMAT=png&EXCEPTIONS=application/vnd.ogc.se_inimage&TRANSPARENT=true&SRS=EPSG:3857&DPI=100&TEMPLATE=A3%20portrait%20topo&map0:extent=2729916.738659,-3359606.364252,2768917.676522,-3308305.130601&map0:scale=150000&map0:grid_interval_x=10000&map0:grid_interval_y=10000&map0:LAYERS=1in50k%20Topographic%20map&map0:STYLES=default&LAYERS=1in50k%20Topographic%20map&STYLES=default&OPACITIES=255&map_title=Enter+map+title

But if I disable this parameter in map.js I get the correct image.

if ( 'grid' in dragCtrl.layout && dragCtrl.layout.grid ) {
                var gridInterval = getPrintGridInterval( dragCtrl.layout, parseFloat(scale), printCapabilities.scales );
                // url += '&'+dragCtrl.layout.mapId+':grid_interval_x='+gridInterval;
                // url += '&'+dragCtrl.layout.mapId+':grid_interval_y='+gridInterval;
            }

Is it important to have the grid_interval_x in the request for printing?

josemvm commented 4 years ago

the same as here ? https://github.com/3liz/lizmap-web-client/issues/1396

NyakudyaA commented 4 years ago

the same as here ? #1396

No, that's a totally different issue. Here the graticule labels are not showing. On the other issue it references the grid not rendering

NyakudyaA commented 1 year ago

This is resolved, Note experiencing this anymore since 3.4