HSLayers.Printer (class)

HSLayers.Printer

class HSLayers.Printer(config)

Printing manager. User can define the paper on the map, scale, title, text and custom which will be layuoted to PDF.

param Object config:
 
param String[] config.scales:
 

(optional, default: map.scales)

array of user defined

for printing

Properties

use the {setMap} method for setting this attribute

The size is in form [width,height] in “pt” units. Since we print 1:1 to screen resolution, pt==px in this case. Papers do have 2.5cm margins (for title, scale)

HSLayers.Printer.box
Type :<a href=”http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/BaseTypes/Bounds-js.html“>OpenLayers.Bounds</a> (static)

HSLayers.Printer

print bounding box

HSLayers.Printer.landscapeCheck
Type :<a href=”http://www.extjs.com/deploy/dev/docs/?class=Ext.form.Checkbox“>Ext.form.Checkbox</a> (static)

HSLayers.Printer

Checkbox for indication of landscape paper

HSLayers.Printer.map

HSLayers.Printer

The map object use the {setMap} method for setting this attribute

HSLayers.Printer.margins in [mm]
Type :Array (static)

HSLayers.Printer

paper margins

HSLayers.Printer.onClearBoxClicked

HSLayers.Printer

Clear the map from paper box

HSLayers.Printer.paperCombo
Type :<a href=”http://www.extjs.com/deploy/dev/docs/?class=Ext.form.ComboBox“>Ext.form.ComboBox</a> (static)

HSLayers.Printer

Combo box for paper format selection

HSLayers.Printer.paperLayer
Type :<a href=”http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Layer/Boxes-js.html“>OpenLayers.Layer.Boxes</a> (static)

HSLayers.Printer

Layer where to draw the paper

HSLayers.Printer.papers
Type :<a href=”http://www.extjs.com/deploy/dev/docs/?class=Ext.data.SimpleStore“>Ext.data.SimpleStore</a> (static)

HSLayers.Printer

List of available paper formats The size is in form [width,height] in “pt” units. Since we print 1:1 to screen resolution, pt==px in this case. Papers do have 2.5cm margins (for title, scale)

HSLayers.Printer.printerScript
Type :String (static)

HSLayers.Printer

The URL to the printing script

HSLayers.Printer.scales
Type :Array (static)

HSLayers.Printer

Scales for the printing map

HSLayers.Printer.scalesCombo
Type :<a href=”http://www.extjs.com/deploy/dev/docs/?class=Ext.form.Combobox“>Ext.form.Combobox</a> (static)

HSLayers.Printer

Field for setuping scale

HSLayers.Printer.textArea
Type :<a href=”http://www.extjs.com/deploy/dev/docs/?class=Ext.form.TextArea“>Ext.form.TextArea</a> (static)

HSLayers.Printer

Field for aditional map text

HSLayers.Printer.title
Type :String (static)

HSLayers.Printer

printer title

HSLayers.Printer.titleField
Type :<a href=”http://www.extjs.com/deploy/dev/docs/?class=Ext.form.TextField“>Ext.form.TextField</a> (static)

HSLayers.Printer

Field for map title

Methods

the paper box to the map

HSLayers.Printer.onFocus(Event)
Setup the printing form, so it coresponds with the map state, draw

the paper box to the map

param Event:e
HSLayers.Printer.getPaperSize(paper)

Return the paper size object

Arguments:
  • paper (String) – “a4” for example
Returns:

Return type:

@link <a href=”http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Size-js.html“>OpenLayers.Size</a>

HSLayers.Printer.drawPaper()

Draw the paper to the map

HSLayers.Printer.onUnfocus(Event)

Delete the paper box

Arguments:
  • Event – e
HSLayers.Printer.onDefineBoxClicked()

DefineBox button clicked

HSLayers.Printer.onBoxDrawed(g)

Draw the paper the the map

:param @link <a href=”http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Bounds-js.html“>OpenLayers.Bounds</a> g:

HSLayers.Printer.setMap(map)

Set the #map object

:param <a href=”http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Map-js.html“>OpenLayers.Map</a> map:

Returns:None
HSLayers.Printer.getClosestScale()

Get closest scale for {@link <a>this.map.getScale()</a>} from this.scales list

Returns:scale
Return type:Float

Main Menu


Table Of Contents

Previous topic

HSLayers.Print.PrintForm (class)

Next topic

HSLayers.SLD.FillSymbolizerPanel (class)

This Page