Print

Use dark colors for code blocksCopy
1
import "@arcgis/map-components/components/arcgis-print";

Print component connects your application with a printing service to allow the map to be printed.

Demo

Properties

PropertyAttributeType
allowed-formats
Array<string> | string
allowed-layouts
Array<string> | string
auto-destroy-disabled
boolean
extra-parameters
any
heading-level
number
icon
string
include-default-templates-disabled
boolean
label
string
position
"bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing"
print-service-url
string
reference-element
ArcgisLinkChart | ArcgisMap | ArcgisScene | string
show-print-area-enabled
boolean
state
readonly
state
"disabled" | "error" | "initializing" | "ready"
{ [x: string]: Array<HashMap<string>> | undefined; }

allowedFormats

Property
allowedFormats: Array<string> | string

Specify the print output file format(s) that the user can select based on the options available from the print service.

Read more...

Attribute
allowed-formats
Default value
"all"

allowedLayouts

Property
allowedLayouts: Array<string> | string

Specify the print output layout(s) that the user can select based on the options available from the print service.

Read more...

Attribute
allowed-layouts
Default value
"all"

autoDestroyDisabled

Property
autoDestroyDisabled: boolean

If true, the component will not be destroyed automatically when it is disconnected from the document. This is useful when you want to move the component to a different place on the page, or temporarily hide it. If this is set, make sure to call the `destroy` method when you are done to prevent memory leaks.

Attribute
auto-destroy-disabled
Default value
false
Property
exportedLinks: Collection<FileLink>

The collection of links exported from the Print widget.

Read more...

extraParameters

Property
extraParameters: any

This option allows passing extra parameters (in addition to templateOptions) to the print (export webmap) requests.

Read more...

Attribute
extra-parameters

headingLevel

Property
headingLevel: number

Indicates the heading level to use for the "Exported files" text where users can access the exported map printout.

Read more...

Attribute
heading-level
Default value
3

icon

Property
icon: string

Icon which represents the component. Typically used when the component is controlled by another component (e.g. by the Expand component). Search Calcite Icons for possible values.

Attribute
icon
Default value
"print"

includeDefaultTemplatesDisabled

Property
includeDefaultTemplatesDisabled: boolean

Indicates whether or not to include defaultTemplates.

Read more...

Attribute
include-default-templates-disabled
Default value
false

label

Property
label: string

The component's default label.

Attribute
label

portal

Property
portal: Portal

It is possible to search a specified portal instance's locator services.

Read more...

position

Property
position: "bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing"
Attribute
position
Default value
"bottom-left"

printServiceUrl

Property
printServiceUrl: string

The URL of the REST endpoint of the Export Web Map Task.

Read more...

Attribute
print-service-url

referenceElement

Property
referenceElement: ArcgisLinkChart | ArcgisMap | ArcgisScene | string
Attribute
reference-element

showPrintAreaEnabled

reflected

Attribute changes are reflected on the DOM.

Property
showPrintAreaEnabled: boolean

The initial state of the print area toggle in the Print widget UI.

Read more...

Attribute
show-print-area-enabled
Default value
false

state

readonlyreflected

Attribute changes are reflected on the DOM.

Property
state: "disabled" | "error" | "initializing" | "ready"

The view model's state.

Read more...

Attribute
state
Default value
"disabled"

templateCustomTextElements

Property
templateCustomTextElements: { [x: string]: Array<HashMap<string>> | undefined; }

An object containing an array of customTextElements name-value pair objects for each print template in a custom print service.

Read more...

templateOptions

Property
templateOptions: TemplateOptions

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

Read more...

Methods

MethodSignature
componentOnReady(): Promise<void>
destroy(): Promise<void>

componentOnReady

Method
componentOnReady(): Promise<void>

Create a promise that resolves once component is fully loaded.

Returns
Promise<void>

destroy

Method
destroy(): Promise<void>

Permanently destroy the component

Returns
Promise<void>

Events

EventType
PrintCompleteEvent
{ name: "state"; }
undefined
PrintSubmitEvent

arcgisComplete

Event
arcgisComplete: PrintCompleteEvent
bubbles

Events triggered on this element will be propagated to their outermost elements.

composed

The event is composable and will propagate across the shadow DOM into the standard DOM.

cancelable

The event's default behavior can be canceled, allowing for custom behavior to be implemented instead.

arcgisPropertyChange

Event
arcgisPropertyChange: { name: "state"; }

Fired when the value of a property is changed. Use this to listen to changes to properties.

bubbles

Events triggered on this element will be propagated to their outermost elements.

composed

The event is composable and will propagate across the shadow DOM into the standard DOM.

cancelable

The event's default behavior can be canceled, allowing for custom behavior to be implemented instead.

arcgisReady

Event
arcgisReady: undefined
bubbles

Events triggered on this element will be propagated to their outermost elements.

composed

The event is composable and will propagate across the shadow DOM into the standard DOM.

cancelable

The event's default behavior can be canceled, allowing for custom behavior to be implemented instead.

arcgisSubmit

Event
arcgisSubmit: PrintSubmitEvent
bubbles

Events triggered on this element will be propagated to their outermost elements.

composed

The event is composable and will propagate across the shadow DOM into the standard DOM.

cancelable

The event's default behavior can be canceled, allowing for custom behavior to be implemented instead.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.