New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.5.0-RC.3 tested - problem with external WMS services #2606
Comments
Hi, |
Thanks for the feedback. |
The RC.4 unfortunately also brings no improvement The Layers (WMS services) "TopPlusOpen Graustufen, see Info" [1] and "Test WMS Nutzungsartentexte, see Info" [2] are deposited with the deactivated option "Get images directly from WMS server". |
@nboisteault we should check the LAYERS passed to the GetPrint and GetPrintAtlas methods do include the "external" layers. These layers are indeed in the QGIS projects, and can (and must) be printed |
@guenterw I did some testing and got some hints how you can solve your problem. First of all, I would like to mention that it's perfectly possible to print external layers, as long as they are added to the QGIS project using the same name as the external layer. And it's not necessary to display this layer in the Lizmap layer tree. There is just one limitation by now: you can only substitute WMS and not WMTS layers using the Lizmap QGIS plugin. But you can add the externalAccess part directly in the project.cfg XML. In the example below, I added the XYZ layer "TopPlusOpen" in QGIS (
Or you can add the corresponding WMS layer (https://sgx.geodatenzentrum.de/wms_topplus_open) to QGIS, set it as Lizmap baselayer and enable "Get images directly from WMS Server" in the Lizmap plugin. There was a problem with network timeouts, which I could solve setting "Timeout for network requests" to 100000 ms in QGIS Network options. Because the BKG services are not very fast, I would recommend to use a proxy Server like MapProxy to cache the tiles locally. This really gives a big performance boost. BTW, I'm using QGIS/QGIS Server 3.22.1-1 on Windows, together with Lizmap 3.5.0. |
@cxcandid thank you for the detailed feedback and the tests. I have now also tried again for half a day but unfortunately without any success. The WMS services are displayed, even with the original name, only if they are fetched directly from the server. And then they are not printed. The solution with the WMTS service and the addition in the cfg file did not work for me. I also created a project with EPSG: 3857. I thought maybe it is because I am working in EPSG:25832. The project is online, but it doesn't bring anything new either. How did you manage to print the external WMS services. Probably without the "Get images directly from WMS server" option after all . Here is the problem that then no map is displayed at all for me. Only the XYZ service from OpenStreetMap works fine. Display and print, regardless of whether the option "Get images directly from WMS server" is enabled or not. And as described, also on my server with QGIS 2.18.28 and Lizmap 3.3.x the printing works perfectly, if the services are not fetched directly from the server. For me the question is, does it basically not work or is the problem with my configuration? |
@guenterw I found an issue with WMS using the debug window of the browser developer tools. I guess you need to rename your WMS layer in QGIS to the name of the WMS Service layer (i.e. "web") so that Lizmap can find it while printing. Please try my simple DEMO project: BKG_Test.zip and don't forget to set the QGIS network timeout to a high value (i.e. 100000) - Settings>Options...>Network>Timeout for network requests Hope this will solve your problem! |
@cxcandid thank you very much for your effort I have set the network timeout. Unfortunately your example does not work either. Only the vector data is printed. You use the option "Get images directly from WMS server" for the WMS service. Could it be my QGIS server installation? Is it possible that additional QGIS server plugins are needed? (I cannot load the WMS service osm-mapnik for the overview from your QGIS project into QGIS, but that is not important here) |
@guenterw I'm slowly running out of ideas, that's really a tough nut ;-) Here are some more questions for you:
The osm-mapnik service was a mistake, now it should work fine: BKG_Test.zip |
yes I am also in despair. I therefore continue to work with QGIS server 2.18.28 and Lizmap 3.3.x, Since everything runs fine. The server is rented from Hetzner.com, as well as again the one with QGIS 2.18. Server. With standard Apache installation, only Ubuntu 20.04 instead of 18.04. Otherwise, everything (including the installation procedure) is almost identical. Strange that the OSM XYZ service works fine. Thanks for the tip with the map proxy. I wanted to test it for my cadastral data anyway. Maybe it can also provide XYZ services. I'll have to take a closer look at it. Thanks in any case. |
@guenterw last try, just to be sure that it is not related to the BKG service. Here's another example with a free basemap from Austria: Basemap_Test.zip And if you like, so we don't bother others, we can continue via phone call in German ;-) |
It is not the fault of the BKG services. It also affects others and own. Summarizing again my problems compared to the older versions (QGIS server 2.18.28 and Lizmap 3.3.x):
@cxcandid We can talk on the phone, I am always happy to get in contact with other Lizmap users. Contact details see https://wagner-it.de |
@guenterw You should try without Lizmap, by requesting directly QGIS Server. It really seems QGIS cannot access the WMS server in your case. When activating the option |
@mdouchin Thanks for the hint but my knowledge (and time) is not enough for that. I get the GetCapabilities incl. the layer information and from the layers also the caption of the legend but not more (but also not from the vector layer). I don't want to share the results here because of the IP address. Thus I remain with my productive systems, in which I must print WMS services, for the time being with the old versions. There everything works fine. |
according to further feedback from Lizmap users, displaying and printing WMS services without the "Get images directly from WMS server" option works fine in the current versions (3.16.x with 3.4.x). Many thanks, especially to the development team of Lizmap for the continuous development of this great WebClient. |
Hi all,
Thank you for providing version 3.5.0-RC.3. I have tested it extensively and almost everything works as usual.
Positively I noticed the speed when creating the PDF files (print).
However, if there is a problem with a layer when printing, it does not (as before) give an error message (pointing out the faulty layer), but simply nothing happens.
But I have a problem with external WMS services.
These are only displayed if the setting "Get images directly from WMS server" is activated. But then these services are not printed.
(I had this problem also with version 3.4.x and QGIS-Server 3.16.x)
In Lizmap 3.3.x with QGIS server 2.18.28 I can print external WMS services if the setting "Get images directly from WMS server" is disabled.
This concerns general external WMS services, like e.g. [1] from BKG [2] but unfortunately also own WMS services, which I provide with Lizmap (3.4.x) and QGIS-Server (3.16.x). I like to split my projects on several servers, for load balancing when rendering.
Lizmap cannot display the WMTS service from BKG [3].
With the Tile Server service (XYZ Tiles) from OpenStreetMap [4], on the other hand, the display and also printing works!
The problem with the external WMS services has been bothering me for a long time and that's why I'm still using Lizmap 3.3.x with QGIS Server 2.18.28.
Am grateful for any hints. Gladly I can generate, or present examples.
Thanks in advance
Günter Wagner
[1] https://sgx.geodatenzentrum.de/wms_topplus_open
[2] https://gdz.bkg.bund.de/index.php/default/webdienste/topplus-produkte/wms-topplusopen-mit-layer-fur-normalausgabe-und-druck-wms-topplus-open.html
[3] https://sgx.geodatenzentrum.de/wmts_topplus_open/1.0.0/WMTSCapabilities.xml
[4] http://tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png
The text was updated successfully, but these errors were encountered: