mapfish / mapfish-print

A component of MapFish for printing templated cartographic maps. This module is the Java serverside module.
http://mapfish.github.io/mapfish-print-doc/
BSD 2-Clause "Simplified" License
184 stars 417 forks source link

512x512 tiles don't works on WMTS layers? #478

Open petzlux opened 7 years ago

petzlux commented 7 years ago

Hi everyone,

Trying to implement high dpi WMTS background layer in our project https://github.com/Geoportail-Luxembourg/geoportailv3/pull/1559

Works great in ol3, but the print makes problems. The print result from this pull request is:

map_geoportal_lu

I have tried to adjust the matrices tilesize setting to [512, 512] but then the background layer goes pink in the print.

I have seen the following discussion #449 but not sure how this applies here.

tsauerwein commented 7 years ago

Yes, this is not yet supported properly (see also https://github.com/mapfish/mapfish-print/issues/154). But it would be an interesting feature to add.

sbrunner commented 7 years ago

What should we do in the print to support HiDPI tiles? As I understand to have HiDPI tiles we should:

But there is nothing in the print... Did I miss something? Or do we want something better?

petzlux commented 7 years ago

we have the tiles ready. we just need the print component to be able to use them ...

sbrunner commented 7 years ago

Then what's missing?

petzlux commented 7 years ago

can you explain to me the correct spec.json to send to mapfish-print for a 512*512 WMTS layer ? As I said, setting matrice.tileSize = [512, 512]; does not work as seen in the screenshot above .

sbrunner commented 7 years ago

I change the title because there nothing related to HiDPI but it seem related to the 512x512 tiles

tsauerwein commented 7 years ago

If I get @petzlux right, they really do have Retina/HighDPI tiles. That is they have a 256x256px tiling scheme, but they are using 512x512px tiles. This is different from using 512x512px tiles for a 512x512px tiling scheme.

sbrunner commented 7 years ago

@tsauerwein I don't understand what you say...

petzlux commented 7 years ago

@sbrunner I think there is a misunderstanding here.

We have wmts layers now that have double resolution. ie a 512x512 tile is used for a 256x256 display in ol3 tilePixelRatio: 2 in the layer def. https://github.com/Geoportail-Luxembourg/geoportailv3/pull/1559/files#diff-c1b2383c6e5019360cf3824e619d7485R91

Also see http://openlayers.org/en/latest/examples/wmts-hidpi.html for an example of what we achieve.

Now we want to use the same effect in our prints, ie use the same 512*512 tile to effectively double the dpi of the background layer.

sbrunner commented 7 years ago

Actually if we don't have HiDPI tiles the tiles are printed as print resolution (as HiDPI) than we don't have to do something for HiDPI tiles we eventually can do something for non HiDPI tiles...