new PrintDialog( [options])
Parameters:
| Name | Type | Argument | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Control options. Properties
|
Extends
Members
-
_labels
-
Print dialog labels (for customisation)
-
formats
-
List of legeng options * / ol.control.PrintDialog.prototype.legendOptions = { off: 'Hide legend', on: 'Show legend' }; /** List of print image file formats
-
marginSize
-
List of margin size
-
paperSize
-
List of paper size
-
scales
-
List of print scale
Methods
-
<static> addLang(lang, labels)
-
Add a new language
Parameters:
Name Type Description langstring lang id
labelsObjetct -
getContentElement()
-
Get dialog content element
Returns:
- Type
- Element
-
getMargin()
-
Get print margin
Returns:
- Type
- number
-
getOrientation()
-
Get print orientation
Returns:
- Type
- string
-
getPage()
-
Get page element
Returns:
- Type
- Element
-
getPrintControl()
-
Get print control
Returns:
- Type
- ol.control.Print
-
getScale()
-
Get the current map scale factor
Returns:
- Type
- number
-
getSize()
-
Get print size
Returns:
- Type
- ol.size
-
getUserElement()
-
Get dialog user element
Returns:
- Type
- Element
-
i18n(what)
-
Translate
Parameters:
Name Type Description whatstring Returns:
- Type
- string
-
isOpen()
-
Check if the dialog is oprn
Returns:
- Type
- boolean
-
print(options)
-
Show print dialog
Parameters:
Name Type Description options* Properties
Name Type Description sizeol/size | string map size as ol/size or A4, etc.
valuenumber | string the scale factor or a scale string as 1/xxx
orientationstring landscape or portrait
marginnumber -
setMap(map)
-
Remove the control from its current map and attach it to the new map. Subclasses may set up event handlers to get notified about changes to the map here.
Parameters:
Name Type Description mapol.Map Map.
-
setMargin(margin)
-
Set print margin
Parameters:
Name Type Description marginnumber -
setOrientation(ori)
-
Set print orientation
Parameters:
Name Type Description oristring landscape or portrait
-
setScale(value)
-
Set the current scale (will change the scale of the map)
Parameters:
Name Type Description valuenumber | string the scale factor or a scale string as 1/xxx
-
setSize(size)
-
Set map print size
Parameters:
Name Type Description sizeol/size | string map size as ol/size or A4, etc.