GeoPrisma logo

GeoExtPrintForm

A print widget that use the GeoExt print components to control print parameters sent to the MapFishPrint service. Their values come from the print service capabilities.

It basically mimics the following GeoExt example :
http://dev.geoext.org/trunk/geoext/examples/print-form.html

Note

When a OverviewMap widget is present, it is automatically linked to this widget and used to send ‘overviewLayers’ to the spec sent to MapFishPrint. This allows the print service to include a map overview in the PDF generated. The config.yaml used must be configured accordingly, see : http://www.mapfish.org/doc/print/configuration.html#map-block . You can turn this feature off using options. See below for more.

XML Sample

Sample configuration.

<geoextprintform>
  <name>W_GeoExtPrintForm</name>
  <options>
    <servicename>S_MapFishPrint</servicename>
    <defaultResolution>150</defaultResolution>
    <noRotationField>true</noRotationField>
  </options>
</geoextprintform>

How to ‘draw’ the widget

This widget must be drawn using the drawWidgets method : drawWidget / drawWidgets

Mandatory Options

servicename:(String) The name of the MapFishService to use with this widget. The service capabilities will be used to populate the values of the fields of this widget (layout, resolution, scale, etc.)

Optional Options

commentFieldLabel:
 

(String) Overrides the default comment field label value. This option supports i18n (internationalization).

commentMaxLength:
 

(Integer) Restrict the number of characters that can be entered for the comment field.

defaultComment:

(String) Defaults to “” (empty string). Sets the default comment value. This option is ignored if the ‘noCommentField’ option is set to true.

defaultLayout:

(String) Defaults to the first layout name from the MapFishPrint service capabilities if not set. Sets the default layout name if its matches one of the capabilities layouts.

defaultMapSubtitle:
 

(String) Defaults to “” (empty string). Sets the default mapSubtitle value. This option is ignored if the ‘mapSubtitleMaxLength’ option is not set.

defaultMapTitle:
 

(String) Defaults to “” (empty string). Sets the default mapTitle value. This option is ignored if the ‘noMapTitleField’ option is set to true.

defaultOverviewMapChecked:
 

(Boolean) Defaults to true. When set, the ‘Include Overview Map’ checkbox is rendered initially checked.

Note

The MapFishPrint service requires to be setup accordingly to actually include a map block using the overviewMap option, see : http://www.mapfish.org/doc/print/configuration.html#map-block

defaultResolution:
 

(Integer) Defaults to first resolution value from the MapFishPrint service capabilities if not set. Sets the default resolution value if its matches one of the capabilities resolutions.

ieWindowOpen:

(Boolean) Defaults to false. Only used when using an Internet Explorer browser. If set to true, instead of opening the PDF inside the same page, it’s opened in a new window. Be sure to allow popups from the page.

legend:

(Boolean) Defaults to false. Whether to include a legend in the generated pdf or not. Only WMS layers are included in it.

Note

The MapFishPrint service requires to be setup accordingly to actually include a legend, see http://www.mapfish.org/doc/print/configuration.html#legends-block

mapSubtitleFieldLabel:
 

(String) Overrides the default map subtitle field label value. This option supports i18n (internationalization).

mapSubtitleMaxLength:
 

(Integer) When set, it enables the map subtitle field. It also restrics the number of characters that can be entered. Recommended value: 50.

Note

There is no noMapSubtitleField option, so unless you set mapSubtitleMaxLength, the field won’t be displayed.

mapTitleFieldLabel:
 

(String) Overrides the default map title field label value. This option supports i18n (internationalization).

mapTitleMaxLength:
 

(Integer) Restrict the number of characters that can be entered for the map title field.

noMapTitleField:
 

(Boolean) Defaults to false. If set to true, the ‘mapTitle’ form field won’t be rendered and the default value of this field becomes ‘Printing Demo’.

noCommentField:

(Boolean) Defaults to false. If set to true, the ‘comment’ form field won’t be rendered.

noLayoutField:

(Boolean) Defaults to false. If set to true, the ‘layout’ form field won’t be rendered.

noOverviewMap:

(Boolean) Defaults to true. When set, the ‘Include Overview Map’ checkbox becomes hidden.

Note

The MapFishPrint service requires to be setup accordingly to actually include a map block using the overviewMap option, see : http://www.mapfish.org/doc/print/configuration.html#map-block

noResolutionField:
 

(Boolean) Defaults to false. If set to true, the ‘resolution’ form field won’t be rendered.

noRotationField:
 

(Boolean) Defaults to false. If set to true, the ‘rotation’ form field won’t be rendered.

noScaleField:

(Boolean) Defaults to false. If set to true, the ‘scale’ form field won’t be rendered.

title:

(String) Defaults to the widget ‘i18n_panel_title’ traduction string. Sets the widget panel title. This option supports i18n (internationalization).

Resource Options

mapGrid:(Boolean) Set this resource option to true if its WMS layer is a grid. When set, a checkbox is added to the form of this widget, which toggles the WMS layer visibility when checked.

Service Options

vendor:

(String) Layers created from a wms service with this option set to mapserver (case insentive) will make sure the GetMap requested by the print service are set according to the dpi currently set, which means if 300 dpi is set, then the images generated in the pdf document will be made in 300 dpi instead of 72.

Note

This feature is supported in MapServer >= 5.6.

MapFishPrint Service Options

legendTitles:(Boolean) Defaults to false. When set, each resource legend will be labeled by its title, on top left position of the image. Requires the widget ‘legend’ option set.

Service Type

mapfishprint

Widget Action

read