Skip to content
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

Print Support and server side issues printing WMTS and TMS layers #5292

Closed
offtherailz opened this issue May 18, 2020 · 8 comments
Closed

Print Support and server side issues printing WMTS and TMS layers #5292

offtherailz opened this issue May 18, 2020 · 8 comments

Comments

@offtherailz
Copy link
Member

offtherailz commented May 18, 2020

Description

We need to provide support for Printing for:

  • WMTS:

    • KVP (gs-stable geoserver WMTS): http://gs-stable.geo-solutions.it/geoserver/wmts
    • REST ( add this WMTS catalog https://www.basemap.at/wmts/1.0.0/WMTSCapabilities.xml)
  • TMS :

subdomains: [
            '0',
            '1',
            '2',
            '3'
        ]

Server side issues

next comments concerns some issues on back-end that has been fixed acting on the request and on the print config.yml.
If you find the issue on WMTS, we need to update config.yml on the related project.

See this issue "Other useful information":
#5189 (comment)

And expecially the linked comment: https://github.com/geosolutions-it/austrocontrol-C125/issues/144#issuecomment-620455864

We need to investigate if these 2 issues are cause by:

  • Wrong print spec (or not documented properties we could use)
  • Issues with mapfish print
  • Issues with GeoServer

Therefore plan a solution to mitigate this problem

Copy of the original comments issues :

For the WMTS layer to mapfish print specification, setting opacity to 1, hides the other layer background, in this case, WMS. I have attached the POST call with the spec sent for WMTS.

Is it due to some problems with the spec request?

Ex: http://localhost:8081/?debug=true#/viewer/openlayers/23534

POST Request (Spec)
POST_WMTS.txt

Screenshot:
Opacity - 0.45
2020-04-28 13_15_38-MapStore HomePage
Opacity - 1
2020-04-28 12_32_56-MapStore HomePage

TMS:
For TMS, I have encountered the below issue.
Mapfish print specification for TMS

POST-SPEC
POST_TMS.txt

Ex: http://localhost:8081/?debug=true#/viewer/openlayers/24413

After conversion, the mapfish prints the tile with white background in place of the TMS layer,
I have tried with three sample TMS services, but the results are same.
https://public.sig.rennesmetropole.fr/geowebcache/service/tms/1.0.0
https://osm.geobretagne.fr/gwc01/service/tms/1.0.0
http://gs-stable.geo-solutions.it/geoserver/gwc/service/tms/1.0.0

Screenshot
2020-04-29 11_37_42-MapStore HomePage

Note: Since the service appends the serviceVersion to the path, so I tried removing the service version in baseURL while sending spec but the result is still the same.

@mbarto
Copy link
Contributor

mbarto commented Sep 21, 2020

@offtherailz @tdipisa in general:

  • we can change brokenUrlPlaceholder in config.yaml to use an inline transparent PNG (this avoids white tiles when we have errors, and replaces them with transparent tiles):
brokenUrlPlaceholder: 'data:png,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII='

About TMS: the attached request is wrong. This is one that works:

POST_TMS.txt

The main differences are:

  • the baseUrl should not include 1.0.0
  • the layer should be fully qualified (with EPSG and format)
  • I also changed resolutions and origin to a standard value for EPSG:3857

@mbarto
Copy link
Contributor

mbarto commented Sep 21, 2020

About WMTS, the attached request works fine with the transparent brokenUrlPlaceholder I mentioned in my previous comment

@mbarto
Copy link
Contributor

mbarto commented Sep 21, 2020

@offtherailz @tdipisa let me know if this is enough to solve your issues, or need anything more / else

@tdipisa
Copy link
Member

tdipisa commented Sep 21, 2020

@mbarto thank you so much for the investigation, it is really useful. I think it is enough for the moment, @offtherailz should be able to replicate according to your feedback and check the TMS code for a fix.

@offtherailz
Copy link
Member Author

@ElenaGallo and @mbarto :
#5910 add a fix for the WMTS part. Still need to investigate for the second part

@offtherailz
Copy link
Member Author

offtherailz commented Sep 22, 2020

Blocked because to be tested it needs to merge #5189

@offtherailz offtherailz changed the title Server side Issues printing WMTS and TMS layers Print Support and server side issues printing WMTS and TMS layers Oct 1, 2020
@ElenaGallo ElenaGallo self-assigned this Oct 2, 2020
@ElenaGallo
Copy link
Contributor

@offtherailz

The layer (WMTS/TMS) no longer prints after changing the layer opacity for the first time.
1_print_wmts

How to repriduce

  • Open a new map
  • Add a WMTS layer
  • On TOC change the opacity of the layer
  • Click on Burger Menu
  • Click on Print and print the map

Current Result
The layer is no longer printed. (if the opacity is brought back to 100% the layer is not printed anyway)

offtherailz added a commit to offtherailz/MapStore2 that referenced this issue Oct 5, 2020
tdipisa pushed a commit that referenced this issue Oct 6, 2020
* #5292: Fixed opacity issues in printing

* Unified opacity exract system in printutils
offtherailz added a commit to offtherailz/MapStore2 that referenced this issue Oct 6, 2020
…it#5972)

* geosolutions-it#5292: Fixed opacity issues in printing

* Unified opacity exract system in printutils
tdipisa pushed a commit that referenced this issue Oct 6, 2020
* #5292: Fixed opacity issues in printing

* Unified opacity exract system in printutils
@tdipisa
Copy link
Member

tdipisa commented Oct 7, 2020

@offtherailz please remember to update the revision in c125 project for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants