Select to view content in your preferred language

Add "title" to print component

419
2
Jump to solution
4 weeks ago
tad
by
Occasional Contributor

Hello,

I'm using the ArcGIS Maps SDK for JavaScript <arcgis-print> component in an mapping application. I'd like to have a default title when the pop-up appears for the user. Is that possible?

Thanks.

0 Kudos
1 Solution

Accepted Solutions
Noah-Sager
Esri Regular Contributor

Hi @tad, thanks for posting your question here. This is available to you via the templateOptions property. Here's the doc:

https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-print/#t...

and

https://developers.arcgis.com/javascript/latest/references/core/widgets/Print/TemplateOptions/

and here is a simple test app to demonstrate:

https://codepen.io/noash/pen/ByLqaZE?editors=1000

But the important bit is just this line:

printComponent.templateOptions = {title: "Add `title` to print component"};

View solution in original post

0 Kudos
2 Replies
Noah-Sager
Esri Regular Contributor

Hi @tad, thanks for posting your question here. This is available to you via the templateOptions property. Here's the doc:

https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-print/#t...

and

https://developers.arcgis.com/javascript/latest/references/core/widgets/Print/TemplateOptions/

and here is a simple test app to demonstrate:

https://codepen.io/noash/pen/ByLqaZE?editors=1000

But the important bit is just this line:

printComponent.templateOptions = {title: "Add `title` to print component"};

0 Kudos
tad
by
Occasional Contributor

Thanks very much!

0 Kudos