Opened 15 years ago
Closed 13 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:1 by , 15 years ago
comment:2 by , 15 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
follow-up: 5 comment:3 by , 15 years ago
The print server shouldn't be part of GP, but I agree about using the simple print widget.
comment:4 by , 15 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.
comment:5 by , 15 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 , 13 years ago
Milestone: | → 1.1.0 |
---|---|
Type: | defect → enhancement |
Having a legend in the pdf printed is a feature often heard, so I'm setting this in 1.1.0.
comment:8 by , 13 years ago
Keywords: | bis-1.4.0 print legend added |
---|---|
Owner: | set to |
Summary: | Legend in print → GeoExtPrintForm - PrintProxy - print legend |
Type: | enhancement → task |
Version: | → trunk |
comment:9 by , 13 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 , 13 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 , 13 years ago
Component: | widgets → server |
---|---|
Resolution: | → fixed |
Status: | new → closed |
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
See the following ticket and example:
http://trac.geoext.org/ticket/153#comment:4
http://dev.geoext.org/trunk/geoext/examples/print-page.html
Some documentation:
http://www.geoext.org/lib/GeoExt/data/PrintProvider.html