import FileLink from "@arcgis/core/widgets/Print/FileLink.js";const FileLink = await $arcgis.import("@arcgis/core/widgets/Print/FileLink.js");- Inheritance:
- FileLink→
Accessor
- Since
- ArcGIS Maps SDK for JavaScript 5.0
Represents an exported map request from the result of the Print widget. Successful exports will have a URL that links to the printout. Failed ones will have information on what went wrong.
Example
const [Print, esriConfig] = await $arcgis.import([ "@arcgis/core/widgets/Print.js", "@arcgis/core/config.js"]);// ...
view.when(function () { print = new Print({ view: view, // specify your own print service printServiceUrl: "https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task" });
// Add widget to the top right corner of the view view.ui.add(print, "top-right");
// use a requestInterceptor to monitor the print widget // for print completion esriConfig.request.interceptors.push({ // set the `urls` property to the URL of the print service so that this // interceptor only applies to requests made to the print service URL urls: print.printServiceUrl, // use the AfterInterceptorCallback to interrogate the exportedLinks property after: function(response) { console.log("exportedLinks: ", print.exportedLinks.items[0]); } });});Constructors
Constructor
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
See the properties table for a list of all the
properties that may be passed into the constructor.
Properties
Any properties can be set, retrieved or listened to. See the
Watch for changes
topic.
| Property | Type | Class |
|---|---|---|
| | ||
declaredClass readonly inherited | ||
| | ||
| | ||
| | ||
| | ||
IPortalItem | null | undefined | | |
"ready" | "error" | "pending" | | |
| |
name
Property
The TemplateOptions.fileName or TemplateOptions.title of the print-out.