Closed Ducarouge closed 3 months ago
Does OpenLayers actually send a DPI parameter in the GetMap request?
No, actually, Openlayers send a POST request for the GetMap without this DPI parameter and, i guess, this why we don't have the same rendering.
Can you try re-adding the DPI via removed in https://github.com/qgis/qwc2/commit/8afc3d81e86b1b27a26a07d2adc8042858a1bfb7 like so
DPI: options.serverType === 'qgis' ? (options.dpi || ConfigUtils.getConfigProp("wmsDpi") || 96) : undefined
When i re-add the DPI with the line above, it works as expected.
For the fix, do i have to do a PR or you do ?
Thank you.
Hi,
After an update of a QWC2 instance, we have some rendering issues in a QGIS project containing symbology based on scales rules.
This differences seems to come from the following commit: https://github.com/qgis/qwc2/commit/8afc3d81e86b1b27a26a07d2adc8042858a1bfb7
Indeed :
the QWC2 application is based on a 96 DPI display: https://github.com/qgis/qwc2/blob/54844de3298c0e23c3e85bcb6e683ca7a04c54d9/utils/MapUtils.js#L14
QGIS Server seems to respect the OGC specifications with a pixel of 0.28x0.28 mm or 90.71 DPI: (section 7.2.4.6.9 Scale denominators) https://www.ogc.org/standard/wms/
So this is what we get from the same call to QGIS Server with and without the DPI parameter :
With DPI=96 (corresponding to the rendering in qgis desktop and before update in QWC at scale 1/5000):
Without (corresponding to the actual rendering in QWC at scale 1/5000 ):
Is this a bug or there is a way to configure QWC2 (or the QGIS Project) to get the same rendering between QWC2 and QGIS ?