Closed gnerred closed 7 years ago
first for 2°:
for 1°:
I purpose that we fix 2°, then see what we will do with 1°.
PS: the links are wrong :-)
Ok with your proposal, so I wait next 2.1 release to test. Do you have already planned the next 2.1 release ?
See also #2544
About the labels size: the dpi parameter is correctly passed to mapserver (MAP_RESOLUTION=270
in my case).
Maybe something is missing in the mapserver configuration? (http://mapserver.org/ru/development/rfc/ms-rfc-55.html)
It is not related to mapserver, but to QGIS server. How do you see this MAP_RESOLUTION ? Here is an example of request sent
@fredj In this case the DPI parameter is missing ...
@gnerred in the admin interface, can you check if this OGCServer "Server type" is QGISserver ?
No it was mapserver... I changed to QGISserver and now it works fine, thanks :O) !
Oh sorry, the problem of printing remains : https://github.com/camptocamp/c2cgeoportal/issues/2962
Finally it an issue when you print a qgis layer with cgxp?
Yes it is still an issue. To reproduce :
1°/ Go to https://preprod.cartoriviera.ch/s/Hvds 2°/ Do a print on the red lines -> symbols are too small in PDF result
In the data sent to the print server, serverType
is still mapserver
:
...
{
baseUrl: "https://preprod.cartoriviera.ch/qgis/qgis_mapserver.fcgi?map=/var/sig/qgis/export.qgs&transparent=true",
customParams: {...},
serverType: "mapserver",
...
}
...
I my database, it seems to be configured correcty :
But your using the CGXP interface who don't use this table ...
So where is it configured ? It seems that it cannot be configured in admin interface, right ? So you have to fix it in the code ?
The problem is that the print in the CGXP interface doesn't use the server type; the value is fixed to mapserver
.
See: https://github.com/camptocamp/cgxp/blob/master/core/src/script/CGXP/plugins/Print.js#L344-L347
So what is the solution ?
Need to be checked with @ger-benjamin and @sbrunner but the following code could be added to the project to set the correct serverType
when encoding the wms layer:
printProvider.on('encodelayer', function(printProvider, layer, encodedLayer) {
if (encodedLayer.baseURL.indexOf('qgis') > -1) {
Ext.apply(encodedLayer, {
serverType: 'qgisserver'
}
});
});
Ok thanks @fredj , I wait your next feed-back
For me thats looks good :-)
I've installed latest 2.2.0.dev13, but there is still a problem on mobile device with QGIS layers. Will it be fixed in this issue ?
@sbrunner will check if ngeo sends the right dpi parameters to QGIS
Now print issue has been added here: https://github.com/camptocamp/ngeo/issues/2793
This issue concerns mobile dpi issue only.
@gnerred in the admin interface I change the server type to QGIS, and it seem working :-)
This should be done manually after running the themev1tov2 script.
OK fine thanks ! So it will be great if script themev1tov2 could be adapted to automatically set server type to QGIS if base URL of layer V1 contains "qgis_mapserver.fcgi". What do you think ? Because each manual step if one more chance to have problems...
With NGEO mobile application, the size parameters of WMS (internal or external) requests are very high...
For example, with a Galaxy S6, we have WIDTH=2160&HEIGHT=3354,
while on a big desktop screen (24''), we have something like WIDTH=2400&HEIGHT=900
I imagine this is related to high resolution of mobile devices... but this has 2 consequences : 1°/ Requests speed are low on mobile devices 2°/ Size of labels defined in pixels for external WMS layers is too small and not readable on the device