Opened 14 years ago

Closed 12 years ago

#78 closed task (fixed)

GeoExtPrintForm - PrintProxy - print legend

Reported by: yvesm Owned by: adube
Priority: major Milestone: 1.4.0
Component: server Version: trunk
Keywords: bis-1.4.0, print, legend Cc:

Description

How can we add a legend to the printed output of PDFPrint ?

Change History (11)

comment:2 by yvesm, 14 years ago

Looks like we need an updated version of the print server and also we should begin using GeoExt's simple print widget : http://lists.mapfish.org/pipermail/users/2010-March/002665.html

comment:3 by adube, 14 years ago

The print server shouldn't be part of GP, but I agree about using the simple print widget.

comment:4 by yvesm, 14 years ago

I have updated the build instructions for the MapFish? print server : http://trac.osgeo.org/geoprisma/ticket/5#comment:10.

I have run this on geoprisma.org today and the new war has been deployed and tested, so we are ready to implement a legend in the print output.

in reply to:  3 comment:5 by yvesm, 14 years ago

Replying to adube:

Right. The server is a separate piece but instructions are provided in GP to build and deploy it because we depend on it.

comment:6 by adube, 12 years ago

Milestone: 1.1.0
Type: defectenhancement

Having a legend in the pdf printed is a feature often heard, so I'm setting this in 1.1.0.

comment:7 by adube, 12 years ago

Milestone: 1.2.01.4.0

No patch, pushed to 1.4.

comment:8 by adube, 12 years ago

Keywords: bis-1.4.0 print legend added
Owner: set to adube
Summary: Legend in printGeoExtPrintForm - PrintProxy - print legend
Type: enhancementtask
Version: trunk

comment:9 by adube, 12 years ago

Here's a summary of the work to do to accomplish this task.

GeoExtPrintForm

  • add a check box with "include legend" in the widget
  • have an option to hide it
  • display it by default
  • on print, add &osmprintlegend=true to the url

PrintProxy

The 'legends' spec will be entirely built by the server. When detecting the osmprintlegend parameter, browse the resources inside the spec and add getLegendGraphic icons for the WMS layers present (only those of wms service type).

Sample

We'll update an existing sample and make the changes accordingly to show that new feature.

comment:10 by adube, 12 years ago

Instead of adding a checkbox to the GeoExtPrintForm widget, with the according "no" and "default" options, we'll simply use one "legend" boolean option, defaults to false (for backward compatibility and you need to setup a "legends" in mapfish print too).

comment:11 by adube, 12 years ago

Component: widgetsserver
Resolution: fixed
Status: newclosed

Fixed in r1368, featuring :

  • PrintProxy : if it detects the osmprintlegend parameter set to true, all resources having a wms service in the spec will be added to the legends spec.
  • GeoExtPrintForm new 'legend' option, defaults to false, to set the osmprintlegend parameter on print.
  • GeoExtPrintForm small fix to alert an error message if something's wrong with the spec returned by MapFishPrint.
  • sample updated
  • documentation added
Note: See TracTickets for help on using tickets.