TemplateOptions

require(["esri/widgets/Print/TemplateOptions"], function(TemplateOptions) { /* code goes here */ });
Class: esri/widgets/Print/TemplateOptions
Inheritance: TemplateOptions Accessor
Since: ArcGIS API for JavaScript 4.6

Defines the layout template options used by the Print widget to generate the print page.

See also:
Example:
templateOptions = new TemplateOptions({
  title: "My Print",
  author: "Sam",
  copyright: "My Company",
  legendEnabled: false
});

Constructors

new TemplateOptions(properties)
Parameter:
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
NameTypeSummaryClass
Boolean

When false, the attribution is not displayed on the printout.

more details
more detailsTemplateOptions
String

The text used for the author if the specified layout contains an author text element.

more details
more detailsTemplateOptions
String

The text used for the copyright if the specified layout contains an copyright text element.

more details
more detailsTemplateOptions
String

The name of the class.

more details
more detailsAccessor
String

Resolution in dots per inch.

more details
more detailsTemplateOptions
String

The output format for the printed map.

more details
more detailsTemplateOptions
Number

Map height.

more details
more detailsTemplateOptions
String

The layout used for the print output.

more details
more detailsTemplateOptions
Boolean

When false, the legend is not displayed on the printout.

more details
more detailsTemplateOptions
Boolean

When true, scale is used in the printed map.

more details
more detailsTemplateOptions
String

The text used for the map title if the specified layout contains a title text element.

more details
more detailsTemplateOptions
Number

Map width.

more details
more detailsTemplateOptions

Property Details

attributionEnabledBoolean

When false, the attribution is not displayed on the printout. This only applies when the layout value is map-only. Reference our policies on Licensing & Attribution for specific attribution requirements.

Default Value:true
authorString

The text used for the author if the specified layout contains an author text element.

The text used for the copyright if the specified layout contains an copyright text element.

declaredClassStringreadonly inherited
Since: ArcGIS API for JavaScript 4.7

The name of the class. The declared class name is formatted as esri.folder.className.

Resolution in dots per inch.

Default Value:96
formatString

The output format for the printed map.

Known Values: pdf | png32 | png8 | jpg | gif | eps | svg | svgz

heightNumber

Map height. This only applies when the layout value is map-only.

layoutString

The layout used for the print output. When the value is map-only or is empty, the output map does not contain any page layout surroundings (for example, title, legend, scale bar and so forth). The print service provides out-of-the-box templates listed in possible values. The server administrator can add additional templates to the print service.

Possible values are listed below:

ValueDescription
map-onlyMap does not contain any layout elements. Only map image is printed.
a3-landscapeA3 Landscape
a3-portraitA3 Portrait
a4-landscapeA4 Landscape
a4-portraitA4 Portrait
letter-ansi-a-landscapeLetter ANSI A Landscape
letter-ansi-a-portraitLetter ANSI A Portrait
tabloid-ansi-b-landscapeTabloid ANSI B Landscape
tabloid-ansi-b-portraitTabloid ANSI B Portrait
legendEnabledBoolean

When false, the legend is not displayed on the printout.

Default Value:true
scaleEnabledBoolean

When true, scale is used in the printed map.

Default Value:false
titleString

The text used for the map title if the specified layout contains a title text element.

widthNumber

Map width. This only applies when the layout value is map-only.

Searching...

API Reference search results

NameTypeModule

There were no match results from your search criteria.