Ticket #285 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Print all OL layers in pdf (including non visible one)

Reported by: Fxp Owned by: pvalsecc
Priority: minor Milestone:
Component: Print.client Version: SVN
Keywords: Cc:
State:

Description (last modified by pvalsecc) (diff)

PDF module print all visible layers in OL maps. How to also print non visible layers and turn them out in PDF layer manager ?

layerName: {visibility: true}

Changes: https://trac.mapfish.org/trac/mapfish/browser/trunk/MapFish/client/mfbase/mapfish/core/PrintProtocol.js#L217

if ((olLayer.getVisibility() && layerOverrides.visibility != false) || 
    layerOverrides.visibility == true) {

Change History

Changed 5 years ago by n.dhuygelaere

When I try to change this line, in the generate PDF document I have this error: "java.io.IOException: the byte array is not a recognized imageformat" and only visibles layers are embeded in the document

Changed 5 years ago by pvalsecc

  • description modified (diff)

Changed 5 years ago by pvalsecc

Please provide the spec sent by the browser.

What you can do as well, is to increase the verbosity and see what URL is failing.

Changed 5 years ago by n.dhuygelaere

All is here: http://www.zonesconchy.sandre.eaufrance.fr/zconchy/frontend_dev.php/atlas/

how can I increase the verbosity? I'm not sure but where are declarations of overrides need to do? I see this example: http://trac.mapfish.org/trac/mapfish/browser/trunk/MapFish/client/examples/print/simple.html, but it still not work.

Overrides are not in the post data provide by firebug eg: <pre> {"pages":[{"center":[267010.1666350005,2413188.500025002],"scale":"50000"}],"dpi":"72","units":"m","srs"

:"EPSG:27582","layers":[{"baseURL":"http://services.sandre.eaufrance.fr/tilecache/tilecache.cgi?","opacity"

:1,"singleTile":false,"customParams":{},"type":"WMS","layers":coqi?,"format":"image/jpeg","styles"

:[]},{"baseURL":"http://geolittoral.application.equipement.gouv.fr/wms/metropole","opacity":1,"singleTile"

:true,"customParams":{"TRANSPARENT":true},"type":"WMS","layers":["Mers_ocean","Fleuves","ortholittorale"

],"format":"image/gif","styles":[]},{"baseURL":"http://services.sandre.eaufrance.fr/tilecache/tilecache

.cgi?","opacity":1,"singleTile":false,"customParams":{"TRANSPARENT":true,"REPROJECT":false},"type":"WMS"

,"layers":ECHINODERMES?,"format":"image/png","styles":[]},{"baseURL":"http://services.sandre.eaufrance

.fr/tilecache/tilecache.cgi?","opacity":1,"singleTile":false,"customParams":{"TRANSPARENT":true,"REPROJECT"

:false},"type":"WMS","layers":ZONE?,"format":"image/png","styles":[]}],"mapTitle":"Zones conchylicoles"

,"layout":"A4 paysage"} </pre>

Changed 5 years ago by pvalsecc

  • status changed from new to closed
  • resolution set to fixed

(In [1366]) Added ability to:

  • limit the layers displayed in the overview map (closes #168)
  • force the printing of not visible OL layers (closes #285)
Note: See TracTickets for help on using tickets.