PrintViewModel
require(["esri/widgets/Print/PrintViewModel"], function(PrintVM) { /* code goes here */ });
esri/widgets/Print/PrintViewModel
Provides the logic for the Print widget.
- See also:
var view = new MapView({
container: "viewDiv",
map: map
});
var print = new Print({
viewModel: new PrintVM({
view: view
})
});
Constructors
- new PrintViewModel(properties)
- Parameter:properties Objectoptional
See the properties for a list of all the properties that may be passed into the constructor.
Property Overview
Name | Type | Summary | Class | |
---|---|---|---|---|
String | The name of the class. more details | more details | Accessor | |
String | The URL of the REST endpoint of the Export Web Map Task. more details | more details | PrintViewModel | |
Number | The time interval in milliseconds between each job status request sent to an asynchronous GP task. more details | more details | PrintViewModel | |
MapView | The view from which the widget will operate. more details | more details | PrintViewModel |
Property Details
- Since: ArcGIS API for JavaScript 4.7
The name of the class. The declared class name is formatted as
esri.folder.className
.
- printServiceUrlString
The URL of the REST endpoint of the Export Web Map Task.
- updateDelayNumber
The time interval in milliseconds between each job status request sent to an asynchronous GP task.
- Default Value:1000
- viewMapView
The view from which the widget will operate.
Method Overview
Name | Return Type | Summary | Class | |
---|---|---|---|---|
Promise<Object> | Prints (exports) the current MapView according to selected options. more details | more details | PrintViewModel |
Method Details
Prints (exports) the current MapView according to selected options.
Parameter:printTemplate PrintTemplateThe PrintTemplate is used to specify the layout template options which is then used by the PrintTask to generate the print page.
Returns:Type Description Promise<Object> Resolves to an object with the following properties: Property Type Description url String URL to the exported printout.