Class: GoPrint

GoPrint

Interaction that allows creating a print configuration for the map.

new GoPrint(OlMap)

Interactions/Views/interact/Print/GoPrint.ts, line 10

Creates an instance of GoPrint.

Name Type Description
OlMap olMap

The map of all layers OlMap

Methods

getAuthor(){string}

Interactions/Views/interact/Print/GoPrint.ts, line 315

Retrieves the author for the print configuration.

Returns:
Type Description
string The author for the print configuration.

getContainer(){HTMLElement}

Interactions/Views/interact/Print/GoPrint.ts, line 163

Creates and returns an HTML container with the map image.

Returns:
Type Description
HTMLElement The HTML container with the map image.

getDate(){string}

Interactions/Views/interact/Print/GoPrint.ts, line 323

Retrieves the date for the print configuration.

Returns:
Type Description
string The date for the print configuration.

getFileName(){string}

Interactions/Views/interact/Print/GoPrint.ts, line 292

Retrieves the file name for the PDF document.

Returns:
Type Description
string The file name for the PDF document.

getGraphicScale(){boolean}

Interactions/Views/interact/Print/GoPrint.ts, line 182

Gets the status of the graphic scale feature.

Returns:
Type Description
boolean true if the graphic scale is enabled; otherwise, false.

getMapImage(format){string|Blob}

Interactions/Views/interact/Print/GoPrint.ts, line 155

Retrieves the image of the map in the specified format.

Name Type Default Description
format string "base64" optional

The format of the image. Defaults to "base64".

Returns:
Type Description
string | Blob The map image in the specified format.

getMarginSize(){any}

Interactions/Views/interact/Print/GoPrint.ts, line 433

Retrieves the margin sizes for the print configuration.

Returns:
Type Description
any The margin sizes for the print configuration.

getName(){string}

Interactions/Views/interact/Print/GoPrint.ts, line 307

Retrieves the name for the print configuration.

Returns:
Type Description
string The name for the print configuration.

getOrientation(){"p"|"l"}

Interactions/Views/interact/Print/GoPrint.ts, line 331

Retrieves the orientation of the printed document.

Returns:
Type Description
"p" | "l" The orientation of the document ("p" for portrait, "l" for landscape).

getPageSize(){Array.<number>}

Interactions/Views/interact/Print/GoPrint.ts, line 364

Retrieves the page size dimensions for the print document based on the selected page size and orientation.

Returns:
Type Description
Array.<number> The width and height of the page in millimeters.

getPrintScale(){number}

Interactions/Views/interact/Print/GoPrint.ts, line 385

Retrieves the print scale value.

Returns:
Type Description
number The print scale value.

getPrintScaleFormated(printScale){string}

Interactions/Views/interact/Print/GoPrint.ts, line 394

Retrieves the print scale formater value.

Name Type Description
printScale number

The print scale. (e.g 10)

Returns:
Type Description
string The print scale value. (e.g 1:10000)

getResolution(){number}

Interactions/Views/interact/Print/GoPrint.ts, line 416

Retrieves the resolution (DPI) for the print.

Returns:
Type Description
number The resolution in DPI.

getSize(){pageSize}

Interactions/Views/interact/Print/GoPrint.ts, line 424

Retrieves the page size configuration for the print document.

Returns:
Type Description
pageSize The page size configuration.

getTemplate(){number}

Interactions/Views/interact/Print/GoPrint.ts, line 339

Retrieves the template number for the print configuration.

Returns:
Type Description
number The template number.

getTranslations(){object}

Interactions/Views/interact/Print/GoPrint.ts, line 347

Retrieves the translations for the print configuration based on the selected language.

Returns:
Type Description
object An object containing translations for the print configuration.

printMap(){void}

Interactions/Views/interact/Print/GoPrint.ts, line 83

Print Map.

Returns:
Type Description
void

setAuthor(author){void}

Interactions/Views/interact/Print/GoPrint.ts, line 210

Sets the author for the print configuration.

Name Type Description
author string

The author for the print configuration.

Returns:
Type Description
void

setCompass(compassId){void}

Interactions/Views/interact/Print/GoPrint.ts, line 246

Sets the compass ID for the print configuration.

Name Type Description
compassId 1 | 2 | 3

The compass ID (1, 2, or 3).

Returns:
Type Description
void

setDate(date){void}

Interactions/Views/interact/Print/GoPrint.ts, line 219

Sets the date for the print configuration.

Name Type Description
date string

The date for the print configuration.

Returns:
Type Description
void

setFileName(fileName){void}

Interactions/Views/interact/Print/GoPrint.ts, line 192

Sets the file name for the PDF document.

Name Type Description
fileName string

The file name for the PDF document.

Returns:
Type Description
void

setGraphicScale(graphicScale){void}

Interactions/Views/interact/Print/GoPrint.ts, line 265

Sets the status of the graphic scale feature.

Name Type Description
graphicScale boolean

true to enable the graphic scale; false to disable it.

Returns:
Type Description
void

setMarginSize(marginSize){void}

Interactions/Views/interact/Print/GoPrint.ts, line 446

Sets the margin sizes for the print configuration.

Name Type Description
marginSize Object

The margin sizes to set.

Name Type Description
top string | number optional

The top margin.

right string | number optional

The right margin.

bottom string | number optional

The bottom margin.

left string | number optional

The left margin.

Returns:
Type Description
void

setName(name){void}

Interactions/Views/interact/Print/GoPrint.ts, line 201

Sets the name for the print configuration.

Name Type Description
name string

The name for the print configuration.

Returns:
Type Description
void

setOrientation(orientation){void}

Interactions/Views/interact/Print/GoPrint.ts, line 228

Sets the orientation of the printed document.

Name Type Description
orientation "p" | "l"

The orientation of the document ("p" for portrait, "l" for landscape).

Returns:
Type Description
void

setPrintScale(printScale){void}

Interactions/Views/interact/Print/GoPrint.ts, line 274

Sets the print scale.

Name Type Description
printScale number

The print scale.

Returns:
Type Description
void

setResolution(resolution){void}

Interactions/Views/interact/Print/GoPrint.ts, line 256

Sets the resolution (DPI) for the print.

Name Type Description
resolution number

The resolution in DPI.

Returns:
Type Description
void

setSize(size){void}

Interactions/Views/interact/Print/GoPrint.ts, line 283

Sets the page size for the print document.

Name Type Description
size pageSize

The page size to use.

Returns:
Type Description
void

setTemplate(template){void}

Interactions/Views/interact/Print/GoPrint.ts, line 237

Sets the template for the print configuration.

Name Type Description
template number

The template number to use for printing.

Returns:
Type Description
void