new HighResolutionPrintModel()
modules/tools/print_/highResolutionPlotService.js, line 100
Properties:
Name | Type | Default | Description |
---|---|---|---|
layoutList |
Array | [ | Array for all available layouts from plot service |
currentLayout |
undefined | Holder for the current selected layout | |
scaleList |
Array | [ | Array for all available scales from plot service |
currentScale |
undefined | Holder for the current selected scale | |
formatList |
Array | [ | Array for all available formats from plot service |
currentFormat |
String | "pdf" | Holder for the current selcted format |
isLegendAvailable |
Boolean | false | Flag if the current layout supports legend |
isGfiAvailable |
Boolean | false | Flag if the current layout supports gfi |
isGfiActive |
Boolean | false | Flag if gfi is active |
isGfiSelected |
Boolean | false | Flag if gfi is to be printed |
isScaleSelectedManually |
Boolean | false | Flag if scale is selected by the user |
isMetaDataAvailable |
Boolean | false | Flag if the current layout supports meta data |
isScaleAvailable |
Boolean | false | Flag if the current layout supports scale |
eventListener |
Object | {} | Holder for an eventListener |
printID |
String | "99999" | Service id for the plot service |
title |
String | "PrintResult" | Initial tilte for the print page |
outputFilename |
String | "Ausdruck" | Filename for print page |
outputFormat |
String | "pdf" | Format for file of print page |
center |
Array | [ | Array for center coordinates of the map |
scale |
Object | {} | Holder for the print scale |
layerToPrint |
Array | [ | Array for all layers to be printed |
gfi |
Boolean | false | Flag if gfi is supported |
printurl |
String | "" | Url to plot service |
gfiMarker |
Object | Style settings for an gfi marker | |
proxyURL |
String | "" | Url to the proxy |
glyphicon |
String | "glyphicon-print" | Icon for the print button |
precomposeListener |
Object | {} | Holder for an PrecomposeListener |
postcomposeListener |
Object | {} | Holder for an PostcomposeListener |
MM_PER_INCHES |
Number | 25.4 | Millimeter per inches |
POINTS_PER_INCH |
Number | 72 | Points per Inch |
DOTS_PER_INCH |
Number | 72 | Dots per inch |
INCHES_PER_METER |
Number | 39.37 | Inches per meter |
Listens to Events:
- Print#event:ChangeIsAvtive
- Print#event:ChangeSpecification
- MapView#event:RadioTriggerMapViewChangedOptions
- MapView#event:RadioTriggerMapViewChangedCenter
- GFI#event:RadioTriggerGFIIsVisible
- Print#event:CreatePrintJob
Extends
Methods
-
calculatePageBoundsPixels(mapSize){Array|String}
modules/tools/print_/highResolutionPlotService.js, line 988 -
calculate the pixels of page bounds
Name Type Description mapSize
Array size of the map Fires:
- MapView#event:RadioRequestMapViewGetOptions
Returns:
page bounds in pixels or an Error String
-
componentToHex(color){String}
modules/tools/print_/highResolutionPlotService.js, line 923 -
Converts an integer (color) to hexadecimal string and return it.
Name Type Description color
Int rgb color code Returns:
hex color code
-
createImagePath(){String}
modules/tools/print_/highResolutionPlotService.js, line 677 -
Gets the path of an image
Returns:
path of the image
-
createPointStyleForPrint(style){Object}
modules/tools/print_/highResolutionPlotService.js, line 631 -
Creates the Style of a Point for printing
Name Type Description style
* style configurations Returns:
Point with styles
-
createPrintMask(evt){void}
modules/tools/print_/highResolutionPlotService.js, line 269 -
Draws the print page rectangle onto the canvas
Name Type Description evt
ol.render.Event postcompose -
drawMask(mapSize, context){void}
modules/tools/print_/highResolutionPlotService.js, line 294 -
Draws a mask on the whole map
Name Type Description mapSize
ol.Size size of the map in px context
CanvasRenderingContext2D context of the postcompose event -
drawPrintPage(mapSize, resolution, printMapSize, scale, context){void}
modules/tools/print_/highResolutionPlotService.js, line 317 -
Draws the print page
Name Type Description mapSize
ol.Size size of the map in px resolution
number resolution of the map in m/px printMapSize
number size of the map on the report in dots scale
number the optimal print scale context
CanvasRenderingContext2D context of the postcompose event -
getAttributeInLayoutByName(name){object|undefined}
modules/tools/print_/highResolutionPlotService.js, line 1060 -
returns a capabilities attribute object of the current layout, corresponding to the given name
Name Type Description name
string name of the attribute to get Returns:
corresponding attribute or null
-
getCapabilities(printID){void}
modules/tools/print_/highResolutionPlotService.js, line 144 -
Gets the capabilities for a specific print configuration
Name Type Description printID
String Service Id to be send with the event Fires:
- RestReader#event:RadioRequestRestReaderGetServiceByIdWithPrintID
-
getColor(value){String}
modules/tools/print_/highResolutionPlotService.js, line 872 -
Proofs if it is a rgb(a) or a hexadecimel String. If it is a rgb(a) string, it will be converted to an hexadecimal string. If available, the opacity (default = 1) is overwritten.
Name Type Description value
Array Color Returns:
hexadecimal String and opacity or an Error String
-
getGfiForPrint(){void}
modules/tools/print_/highResolutionPlotService.js, line 790 -
Sets createURL in dependence of GFI
Fires:
- GFI#event:RadioRequestGFIGetIsVisible
- GFI#event:RadioRequestGFIGetGfiForPrint
-
getLayoutByName(layoutList, layoutName){object}
modules/tools/print_/highResolutionPlotService.js, line 236 -
Returns the layout for the given layout name
Name Type Description layoutList
Array.<object> available layouts of the specified print configuration layoutName
string name for the layout to be found -
getOptimalResolution(scale, mapSize, printMapSize){number|String}
modules/tools/print_/highResolutionPlotService.js, line 1026 -
gets the optimal map resolution for a print scale and a map size
Name Type Description scale
number print scale for the report mapSize
Array.<number> the current map size printMapSize
Array.<number> size of the map on the report Returns:
the optimal resolution or an Error String
-
getOptimalScale(mapSize, resolution, printMapSize, scaleList){number|String}
modules/tools/print_/highResolutionPlotService.js, line 343 -
Gets the optimal print scale for a map
Name Type Description mapSize
ol.Size size of the map in px resolution
number resolution of the map in m/px printMapSize
ol.Size size of the map on the report in dots scaleList
Array.<object> supported print scales, sorted in ascending order Returns:
optimal scale or an Error String
-
getPDFURL(){void}
modules/tools/print_/highResolutionPlotService.js, line 818 -
Conducts an HTTP-Post-Request.
Fires:
- Alert#event:RadioTriggerAlertalert
- Util#event:RadioTriggerUtilHideLoader
- Util#event:RadioTriggerUtilShowLoader
-
getPrintMapSize(){Array.<number>}
modules/tools/print_/highResolutionPlotService.js, line 1049 -
returns the size of the map on the report
Returns:
width and height
-
handlePostCompose(evt){void}
modules/tools/print_/highResolutionPlotService.js, line 951 -
create print bounding box
Name Type Description evt
* event Fires:
- Map#event:RadioRequestMapGetSize
-
handlePreCompose(evt){void}
modules/tools/print_/highResolutionPlotService.js, line 939 -
Saves event contex of Precompose
Name Type Description evt
* event -
openPDF(data){void}
modules/tools/print_/highResolutionPlotService.js, line 848 -
Opens the generated PDF in the browser.
Name Type Description data
Object Answer from print service. Contains the URL for the generated PDF. -
print(){void}
modules/tools/print_/highResolutionPlotService.js, line 217 -
Print! Is called from View by clicking the print button
Fires:
- Draw#event:RadioRequestDrawGetLayer
- ModelList#event:RadioRequestModelListGetModelsByAttributesWithisVisibleInMapAndTyp
- ModelList#event:RadioRequestModelListGetModelsByAttributesWithisVisibleInMapAndTyp
-
push(attribute, value){void}
modules/tools/print_/highResolutionPlotService.js, line 858 -
Helper method to set an attribute of type array.
Name Type Description attribute
String The attribute to set. value
whatever The value of the attribute. -
rgbToHex(red, green, blue){String}
modules/tools/print_/highResolutionPlotService.js, line 910 -
returns the assembled hexadecimal string.
Name Type Description red
Int rgb color code green
Int rgb color code blue
Int rgb color code Returns:
hex color code
-
setCenter(value){void}
modules/tools/print_/highResolutionPlotService.js, line 395 -
Sets center coordinate.
Name Type Description value
array coordinates of the map center Fires:
- Alert#event:RadioTriggerAlertalert
-
setCurrentFormat(value){void}
modules/tools/print_/highResolutionPlotService.js, line 1138 -
Sets a value for the current format
Name Type Description value
string current print format Fires:
- Alert#event:RadioTriggerAlertalert
-
setCurrentLayout(value){void}
modules/tools/print_/highResolutionPlotService.js, line 1120 -
Sets a value for the current Layout
Name Type Description value
Array.<object> current print layout Fires:
- Alert#event:RadioTriggerAlertalert
-
setCurrentScale(value){void}
modules/tools/print_/highResolutionPlotService.js, line 1226 -
Sets a value for the current scale of the map
Name Type Description value
number current print scale Fires:
- Alert#event:RadioTriggerAlertalert
-
setEventListener(value){void}
modules/tools/print_/highResolutionPlotService.js, line 1296 -
Sets an eventlistener
Name Type Description value
* Eventlistener for Map on postcompose -
setFormatList(formats){void}
modules/tools/print_/highResolutionPlotService.js, line 1256 -
Sets all formats available for a print
Name Type Description formats
* list of formats from plot service -
setGFIPos(gfiPosition){void}
modules/tools/print_/highResolutionPlotService.js, line 744 -
Checks, if a circle should be drawn at GFI-Position and, if necessary, adds a layer.
Name Type Description gfiPosition
Array.<number> gfi Position -
inherited setGlyphicon(value){void}
modules/core/modelList/item.js, line 69 -
Setter for glyphicon
Name Type Description value
String Glyphicon -
setGROUPLayerToPrint(layers){void}
modules/tools/print_/highResolutionPlotService.js, line 439 -
Manage printing of group layers
Name Type Description layers
* group layers -
inherited setId(value){void}
modules/core/modelList/item.js, line 34 -
Setter for id
Name Type Description value
String Id -
inherited setIsActive(value){void}
modules/core/modelList/tool/model.js, line 129 -
Activates or deactivates tool
Name Type Description value
Boolean Flag if tool is active -
setIsGfiActive(value){void}
modules/tools/print_/highResolutionPlotService.js, line 1169 -
Sets a value for the activity of gfi
Name Type Description value
boolean true if gfi is active -
setIsGfiAvailable(value){void}
modules/tools/print_/highResolutionPlotService.js, line 1155 -
Sets a value for the availability of gfi
Name Type Description value
boolean true if mapfish can print gfi -
setIsGfiSelected(value){void}
modules/tools/print_/highResolutionPlotService.js, line 1183 -
Sets a value for gfi select
Name Type Description value
boolean true if gfi is to be printed -
inherited setIsInThemen(value){void}
modules/core/modelList/item.js, line 78 -
Setter for isInThemen
Name Type Description value
Boolean Flag if item is in themen -
setIsLegendAvailable(value){void}
modules/tools/print_/highResolutionPlotService.js, line 1197 -
Sets a value for the availability of the legend
Name Type Description value
boolean true if mapfish can print legend -
setIsMetaDataAvailable(value){void}
modules/tools/print_/highResolutionPlotService.js, line 1087 -
Sets a value for metadata availability for the model
Name Type Description value
boolean true if the current layout supports meta data -
setIsScaleAvailable(value){void}
modules/tools/print_/highResolutionPlotService.js, line 1211 -
Sets a value for the availability of the scale
Name Type Description value
boolean true if mapfish can print scale -
setIsScaleSelectedManually(value){void}
modules/tools/print_/highResolutionPlotService.js, line 1282 -
Sets a value for manually selected scales
Name Type Description value
boolean true if the scale is selected by the user -
inherited setIsVisibleInMenu(value){void}
modules/core/modelList/item.js, line 105 -
Setter for setIsVisibleInMenu
Name Type Description value
Boolean Flag if item is visible in menu -
inherited setIsVisibleInTree(value){void}
modules/core/modelList/item.js, line 96 -
Setter for isVisibleInTree
Name Type Description value
Boolean Flag if item is visible in layertree -
setLayer(layer){void}
modules/tools/print_/highResolutionPlotService.js, line 557 -
Sets layer properties
Name Type Description layer
* layer Fires:
- ModelList#event:RadioRequestModelListGetModelsByAttributesWithId
- StyleList#event:RadioRequestStyleListReturnModelByIdWithStyleId
-
setLayoutList(layouts){void}
modules/tools/print_/highResolutionPlotService.js, line 1243 -
Sets all layouts available for a print
Name Type Description layouts
* list of layouts from plot service -
inherited setLevel(value){void}
modules/core/modelList/item.js, line 87 -
Setter for level
Name Type Description value
String Level -
inherited setName(value){void}
modules/core/modelList/item.js, line 52 -
Setter for name
Name Type Description value
String Name -
inherited setParentId(value){void}
modules/core/modelList/item.js, line 43 -
Setter for parentId
Name Type Description value
String ParentId -
setPostcomposeListener(value){void}
modules/tools/print_/highResolutionPlotService.js, line 1078 -
Sets a postcompose Listener for the model
Name Type Description value
* eventlistener on Map for postcompose -
setPrecomposeListener(value){void}
modules/tools/print_/highResolutionPlotService.js, line 1069 -
Sets a precompose Listener for the model
Name Type Description value
* eventlistener on Map for precompose -
setScaleByMapView(){void}
modules/tools/print_/highResolutionPlotService.js, line 381 -
Sets scale for print with the zoom of the map.
Fires:
- MapView#event:RadioRequestMapViewGetOptions
-
setScaleList(scales){void}
modules/tools/print_/highResolutionPlotService.js, line 1269 -
Sets all scales available for a print
Name Type Description scales
* list of scales from plot service -
setSpecification(gfiPosition){void}
modules/tools/print_/highResolutionPlotService.js, line 695 -
GFI Managing
Name Type Description gfiPosition
* Position of GFI Fires:
- Map#event:RadioRequestMapGetLayers
- MapView#event:RadioRequestMapViewGetProjection
- MapView#event:RadioRequestMapViewGetCenter
-
setTitle(value){void}
modules/tools/print_/highResolutionPlotService.js, line 1102 -
Sets the title for the print page
Name Type Description value
String Title Fires:
- Alert#event:RadioTriggerAlertalert
-
inherited setType(value){void}
modules/core/modelList/item.js, line 60 -
Setter for type
Name Type Description value
String Type -
setWMSLayerToPrint(layers){void}
modules/tools/print_/highResolutionPlotService.js, line 491 -
Manage printing of WMS layers
Name Type Description layers
* WMS layers -
inherited superChangeLang(){Void}
modules/core/modelList/tool/model.js, line 113 -
change language - sets or translates the name of this tool, if property i18nextTranslate is no function. If name is defined in config.json, the name is not translated else property nameTranslationKey is used.
-
togglePostcomposeListener(model, value, postcompose){void}
modules/tools/print_/highResolutionPlotService.js, line 254 -
If the tool is activated and there is a layout, a callback function is registered to the postcompose event of the map
Name Type Description model
Backbone.Model this value
boolean is this tool activated or not postcompose
String postcomposeListener String eventlistener Fires:
- Map#event:RadioRequestMapRegisterListenerWithPostcompose
- Map#event:RadioTriggerMapUnregisterListenerWithEventListener
- Map#event:RadioTriggerMapRender
-
updateParameter(response){String}
modules/tools/print_/highResolutionPlotService.js, line 178 -
Parses all capabilites
Name Type Description response
* response from print service Fires:
- MapView#event:RadioRequestMapViewGetOptions
- Alert#event:RadioTriggerAlertalert
Returns:
shows if the function succeeds or fails
-
updatePrintPage(){void}
modules/tools/print_/highResolutionPlotService.js, line 416 -
Updates the Print Page
Fires:
- Map#event:RadioRequestMapRegisterListenerWithPrecompose
- Map#event:RadioRequestMapRegisterListenerWithPostcompose
- Map#event:RadioTriggerMapUnregisterListenerWithPrecomposeListener
- Map#event:RadioTriggerMapUnregisterListenerWithPostcomposeListener
- Map#event:RadioTriggerMapRender