new PrintModel()
modules/tools/print_/mapfish3PlotService.js, line 103
Properties:
| Name | Type | Default | Description |
|---|---|---|---|
filename |
String | "report" | Output filename |
mapfishServiceId |
undefined | id from rest service json for mapfish app | |
printAppId |
String | "master" | identifier of one of available mapfish print configurations |
layoutList |
Array | [ | Array of available layouts of the specified print configuration |
currentLayout |
undefined | Holder for the current selected layout | |
formatList |
Array | [ | Array of available formats of the specified print configuration |
currentFormat |
String | "pdf" | The current Format |
currentScale |
undefined | Holder for the current rpint scale | |
title |
String | "PrintResult" | Initial title for the print page |
isScaleSelectedManually |
Boolean | false | Flag if the scale was selected by the user over the view |
isMetaDataAvailable |
Boolean | false | Flag if the current layout supports meta data |
isGfiAvailable |
Boolean | false | Flag if the current layout supports gfi |
isGfiActive |
Boolean | false | Flag if gfi is active |
isLegendAvailable |
Boolean | false | Flag if the current layout supports legend |
isLegendSelected |
Boolean | true | Flag if the legend is to be printed |
isScaleAvailable |
Boolean | false | Flag if the current layout supports scale |
plotServiceId |
undefined | id from the rest services json for the plot app | |
deactivateGFI |
Boolean | false | Flag if gfi is deactivated |
renderToWindow |
Boolean | true | todo |
DOTS_PER_INCH |
Number | 72 | todo |
INCHES_PER_METER |
Number | 39.37 | todo |
glyphicon |
String | "glyphicon-print" | Icon for the print button |
eventListener |
Object | {} | todo |
printLegend |
Boolean | false | Flag if checkbox to print legend should be activated. |
currentLng |
String | "" contains the current language - view listens to it | |
titleLabel |
String | Label text for print-window | |
titlePlaceholder |
String | placeholder text for print-window | |
layoutLabel |
String | Label text for print-window | |
formatLabel |
String | Label text for print-window | |
scaleLabel |
String | Label text for print-window | |
legendLabel |
String | Label text for print-window | |
printLabel |
String | Label text for print-window |
Listens to Events:
- Print#event:ChangeIsActive
- MapView#event:RadioTriggerMapViewChangedOptions
- GFI#event:RadioTriggerGFIIsVisible
- Print#event:CreatePrintJob
Extends
Methods
-
categorizeDPIList(dpiList){Object}
addons/printLGB/model.js, line 936 -
categorize DPI List
Name Type Description dpiListArray input dpi list Returns:
dpi list
-
changeLang(lng){Void}
modules/tools/print_/mapfish3PlotService.js, line 149 -
change language - sets default values for the language
Name Type Description lngString the language changed to -
changeLang(lng){Void}
addons/printLGB/model.js, line 236 -
change language - sets default values for the language
Name Type Description lngString the language changed to -
createMapFishServiceUrl(id){void}
modules/tools/print_/mapfish3PlotService.js, line 169 -
todo
Name Type Description id* todo -
createMapFishServiceUrl(id){void}
addons/printLGB/model.js, line 267 -
function to compose the mapfish service url
Name Type Description idstring mapfish serice id -
createPrintJob(printAppId, payload, format){void}
modules/tools/print_/mapfish3PlotService.js, line 286 -
sends a request to create a print job
Name Type Description printAppIdstring id of the print configuration payloadstring POST body formatstring print job output format -
createPrintJob(printAppId, payload, format){void}
addons/printLGB/model.js, line 454 -
sends a request to create a print job
Name Type Description printAppIdstring id of the print configuration payloadstring POST body formatstring print job output format -
createPrintMask(evt){void}
modules/tools/print_/mapfish3PlotService.js, line 336 -
draws the print page rectangle onto the canvas
Name Type Description evtol.render.Event postrender -
drawMask(mapSize, context){void}
modules/tools/print_/mapfish3PlotService.js, line 361 -
draws a mask on the whole map
Name Type Description mapSizeol.Size size of the map in px contextCanvasRenderingContext2D context of the postrender event -
drawPrintPage(mapSize, resolution, printMapSize, scale, context){void}
modules/tools/print_/mapfish3PlotService.js, line 384 -
draws the print page
Name Type Description mapSizeol.Size size of the map in px resolutionnumber resolution of the map in m/px printMapSizenumber size of the map on the report in dots scalenumber the optimal print scale contextCanvasRenderingContext2D context of the postrender event -
filterLayoutList(){void}
addons/printLGB/model.js, line 859 -
filter Layout list according to a specified String
Properties:
Name Type Description filterLayoutListString value for filtering console.log("layoutList",layoutList); -
getAttributeInLayoutByName(name){object|undefined}
modules/tools/print_/mapfish3PlotService.js, line 467 -
returns a capabilities attribute object of the current layout, corresponding to the given name
Name Type Description namestring name of the attribute to get Returns:
attribute or null
-
getAttributeInLayoutByName(name){object|undefined}
addons/printLGB/model.js, line 656 -
returns a capabilities attribute object of the current layout, corresponding to the given name
Name Type Description namestring name of the attribute to get Returns:
attribute or null
-
getCapabilites(model, value){void}
modules/tools/print_/mapfish3PlotService.js, line 181 -
Gets the capabilities for a specific print configuration
Name Type Description modelBackbone.Model this valueboolean is this tool activated or not -
getCapabilites(model, value){void}
addons/printLGB/model.js, line 279 -
Gets the capabilities for a specific print configuration
Name Type Description modelBackbone.Model this valueboolean is this tool activated or not -
getClosestScaleToFitExtentFeature(){Number}
addons/printLGB/model.js, line 913 -
Returns the closest scale for the current extent feature. That is the extent for the scale that is fully covered by the print extent.
Returns:
closest scale.
-
getLayoutByName(layoutList, layoutName){object}
modules/tools/print_/mapfish3PlotService.js, line 479 -
returns the layout for the given layout name
Name Type Description layoutListArray.<object> available layouts of the specified print configuration layoutNamestring name for the layout to be found -
getLayoutByName(layoutList, layoutName){object}
addons/printLGB/model.js, line 668 -
returns the layout for the given layout name
Name Type Description layoutListArray.<object> available layouts of the specified print configuration layoutNamestring name for the layout to be found -
getOptimalResolution(scale, mapSize, printMapSize){number}
modules/tools/print_/mapfish3PlotService.js, line 434 -
gets the optimal map resolution for a print scale and a map size
Name Type Description scalenumber print scale for the report mapSizeArray.<number> the current map size printMapSizeArray.<number> size of the map on the report Returns:
optimal resolution
-
getOptimalScale(mapSize, resolution, printMapSize, scaleList){number}
modules/tools/print_/mapfish3PlotService.js, line 410 -
gets the optimal print scale for a map
Name Type Description mapSizeol.Size size of the map in px resolutionnumber resolution of the map in m/px printMapSizeol.Size size of the map on the report in dots scaleListArray.<object> supported print scales, sorted in ascending order Returns:
optimal scale
-
getPrintExtentSize(printMapSize, printScale){Object}
addons/printLGB/model.js, line 605 -
Computes size of print extent in pixel depending on dimensions of print map and print scale.
Name Type Description printMapSizeObject Print map size containing its width and height. printScalenumber Print scale. Returns:
extent size.
-
getPrintMapScales(){Array.<number>}
modules/tools/print_/mapfish3PlotService.js, line 456 -
returns the supported scales of the map in the report
Returns:
list
-
getPrintMapScales(){Array.<Number>}
addons/printLGB/model.js, line 645 -
returns the supported scales of the map in the report
Returns:
list
-
getPrintMapSize(){Array.<number>}
modules/tools/print_/mapfish3PlotService.js, line 446 -
returns the size of the map on the report
Returns:
and height
-
getPrintMapSize(){Array.<Number>}
addons/printLGB/model.js, line 626 -
returns the size of the map on the report
Returns:
and height
-
handleMoveEvent(){void}
addons/printLGB/model.js, line 565 -
handle scales after map has been moved
-
invertFeatureGeometry(printExtent){OlFeature}
addons/printLGB/model.js, line 533 -
inverts an extent to a polygon with hole
Name Type Description printExtentArray Print extent. Returns:
feature with the inversed geometry.
-
parseMapfishCapabilities(response){void}
modules/tools/print_/mapfish3PlotService.js, line 200 -
todo
Name Type Description response* todo Fires:
- event:todo
-
parseMapfishCapabilities(response){void}
addons/printLGB/model.js, line 298 -
todo
Name Type Description response* todo Fires:
- event:todo
-
print(){void}
modules/tools/print_/mapfish3PlotService.js, line 216 -
todo
-
print(){void}
addons/printLGB/model.js, line 340 -
todo
-
requestError(jqXHR){void}
addons/printLGB/model.js, line 700 -
ajax error function
Name Type Description jqXHRObject ajax jquery xhr object -
sendRequest(serviceUrl, requestType, successCallback, data){void}
modules/tools/print_/mapfish3PlotService.js, line 503 -
Performs an asynchronous HTTP request
Name Type Description serviceUrlstring the url of the print service requestTypestring GET || POST successCallbackfunction called if the request succeeds dataJSON payload -
sendRequest(serviceUrl, requestType, successCallback, requestError, data){void}
addons/printLGB/model.js, line 683 -
Performs an asynchronous HTTP request
Name Type Description serviceUrlstring the url of the print service requestTypestring GET || POST successCallbackfunction called if the request succeeds requestErrorfunction called if the request fails dataJSON payload -
setCurrentFormat(value){void}
modules/tools/print_/mapfish3PlotService.js, line 541 -
Name Type Description valuestring current print format -
setCurrentFormat(value){void}
addons/printLGB/model.js, line 753 -
Name Type Description valuestring current print format -
setCurrentLayout(value){void}
modules/tools/print_/mapfish3PlotService.js, line 525 -
Name Type Description valueArray.<object> current print layout -
setCurrentLayout(value){void}
addons/printLGB/model.js, line 720 -
Name Type Description valueArray.<object> current print layout -
setCurrentScale(value){void}
modules/tools/print_/mapfish3PlotService.js, line 549 -
Name Type Description valuenumber current print scale -
setCurrentScale(value){void}
addons/printLGB/model.js, line 761 -
Name Type Description valuenumber current print scale -
setDefaultLayout(){void}
addons/printLGB/model.js, line 323 -
Either sets the default layout by the one defined in the config or the first available one given from the (filtered) capabilities.
-
setEventListener(value){void}
modules/tools/print_/mapfish3PlotService.js, line 635 -
todo
Name Type Description value* todo -
setEventListener(value){void}
addons/printLGB/model.js, line 850 -
todo
Name Type Description value* todo -
setFormatList(value){void}
modules/tools/print_/mapfish3PlotService.js, line 533 -
Name Type Description valueArray.<string> available formats of the specified print configuration -
setFormatList(value){void}
addons/printLGB/model.js, line 728 -
Name Type Description valueArray.<string> available formats of the specified print configuration -
inherited setGlyphicon(value){void}
modules/core/modelList/item.js, line 69 -
Setter for glyphicon
Name Type Description valueString Glyphicon -
inherited setId(value){void}
modules/core/modelList/item.js, line 34 -
Setter for id
Name Type Description valueString Id -
inherited setIsActive(value){void}
modules/core/modelList/tool/model.js, line 129 -
Activates or deactivates tool
Name Type Description valueBoolean Flag if tool is active -
setIsGfiActive(value){void}
modules/tools/print_/mapfish3PlotService.js, line 572 -
Name Type Description valueboolean true if gfi is active -
setIsGfiActive(value){void}
addons/printLGB/model.js, line 787 -
Name Type Description valueboolean true if gfi is active -
setIsGfiAvailable(value){void}
modules/tools/print_/mapfish3PlotService.js, line 565 -
Name Type Description valueboolean true if mapfish can print gfi -
setIsGfiAvailable(value){void}
addons/printLGB/model.js, line 780 -
Name Type Description valueboolean true if mapfish can print gfi -
setIsGfiSelected(value){void}
modules/tools/print_/mapfish3PlotService.js, line 594 -
Name Type Description valueboolean true if gfi is to be printed -
setIsGfiSelected(value){void}
addons/printLGB/model.js, line 809 -
Name Type Description valueboolean true if gfi is to be printed -
inherited setIsInThemen(value){void}
modules/core/modelList/item.js, line 78 -
Setter for isInThemen
Name Type Description valueBoolean Flag if item is in themen -
setIsLegendAvailable(value){void}
modules/tools/print_/mapfish3PlotService.js, line 579 -
Name Type Description valueboolean true if mapfish can print legend -
setIsLegendAvailable(value){void}
addons/printLGB/model.js, line 794 -
Name Type Description valueboolean true if mapfish can print legend -
setIsLegendSelected(value){void}
modules/tools/print_/mapfish3PlotService.js, line 557 -
Name Type Description valueboolean true if the legend is to be printed -
setIsLegendSelected(value){void}
addons/printLGB/model.js, line 772 -
Name Type Description valueboolean true if the legend is to be printed -
setIsMetaDataAvailable(value){void}
modules/tools/print_/mapfish3PlotService.js, line 602 -
Name Type Description valueboolean true if the current layout supports meta data -
setIsMetaDataAvailable(value){void}
addons/printLGB/model.js, line 817 -
Name Type Description valueboolean true if the current layout supports meta data -
setIsScaleAvailable(value){void}
modules/tools/print_/mapfish3PlotService.js, line 586 -
Name Type Description valueboolean true if mapfish can print scale -
setIsScaleAvailable(value){void}
addons/printLGB/model.js, line 801 -
Name Type Description valueboolean true if mapfish can print scale -
setIsScaleSelectedManually(value){void}
modules/tools/print_/mapfish3PlotService.js, line 618 -
Name Type Description valueboolean true if the scale is selected by the user -
setIsScaleSelectedManually(value){void}
addons/printLGB/model.js, line 833 -
Name Type Description valueboolean 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 valueBoolean Flag if item is visible in menu -
inherited setIsVisibleInTree(value){void}
modules/core/modelList/item.js, line 96 -
Setter for isVisibleInTree
Name Type Description valueBoolean Flag if item is visible in layertree -
setLayoutList(value){void}
modules/tools/print_/mapfish3PlotService.js, line 517 -
Name Type Description valueArray.<object> available layouts of the specified print configuration -
setLayoutList(value){void}
addons/printLGB/model.js, line 712 -
Name Type Description valueArray.<object> available layouts of the specified print configuration -
inherited setLevel(value){void}
modules/core/modelList/item.js, line 87 -
Setter for level
Name Type Description valueString Level -
setMapfishServiceUrl(value){void}
modules/tools/print_/mapfish3PlotService.js, line 626 -
Name Type Description valuestring mapfish print service url -
setMapfishServiceUrl(value){void}
addons/printLGB/model.js, line 841 -
Name Type Description valuestring mapfish print service url -
inherited setName(value){void}
modules/core/modelList/item.js, line 52 -
Setter for name
Name Type Description valueString Name -
inherited setParentId(value){void}
modules/core/modelList/item.js, line 43 -
Setter for parentId
Name Type Description valueString ParentId -
setTitle(value){void}
modules/tools/print_/mapfish3PlotService.js, line 610 -
Name Type Description valuestring title for the printout -
setTitle(value){void}
addons/printLGB/model.js, line 825 -
Name Type Description valuestring title for the printout -
inherited setType(value){void}
modules/core/modelList/item.js, line 60 -
Setter for type
Name Type Description valueString Type -
sortNumbers(a, b){number}
modules/tools/print_/mapfish3PlotService.js, line 491 -
sorts an array numerically and ascending
Name Type Description anumber first value bnumber next value Returns:
negative, zero, or positive value
-
sortVisibleLayerListByZindex(visibleLayerList){array}
modules/tools/print_/mapfish3PlotService.js, line 266 -
sorts the visible layer list by zIndex from layer layers with undefined zIndex come to the beginning of array
Name Type Description visibleLayerListarray with visble layer Returns:
visibleLayerList
-
sortVisibleLayerListByZindex(visibleLayerList){array}
addons/printLGB/model.js, line 434 -
sorts the visible layer list by zIndex from layer layers with undefined zIndex come to the beginning of array
Name Type Description visibleLayerListarray with visble layer Returns:
visibleLayerList
-
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.
-
togglePostrenderListener(model, value){void}
modules/tools/print_/mapfish3PlotService.js, line 320 -
if the tool is activated and there is a layout, a callback function is registered to the postrender event of the map
Name Type Description modelBackbone.Model this valueboolean is this tool activated or not -
waitForPrintJob(response){void}
modules/tools/print_/mapfish3PlotService.js, line 298 -
sends a request to get the status for a print job until it is finished
Name Type Description responseJSON todo -
waitForPrintJob(response){void}
addons/printLGB/model.js, line 466 -
sends a request to get the status for a print job until it is finished
Name Type Description responseJSON todo