Provides the logic for the Print widget.
var view = new MapView({
container: "viewDiv",
map: map
});
var print = new Print({
viewModel: new PrintVM({
view: view
})
});
Constructors
new PrintViewModel(properties)
properties Object See the properties for a list of all the properties that may be passed into the constructor. |
Property Overview
Name | Type | Summary | |
---|---|---|---|
String | The name of the class. more details | more details | |
String | The URL of the REST endpoint of the Export Web Map Task. more details | more details | |
Number | The time interval in milliseconds between each job status request sent to an asynchronous GP task. more details | more details | |
MapView | The view from which the widget will operate. more details | more details |
Property Details
declaredClassStringreadonly
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: 1000viewMapView
The view from which the widget will operate.
Method Overview
Name | Return Type | Summary | |
---|---|---|---|
Promise | Prints (exports) the current MapView according to selected options. more details | more details |
Method Details
print(printTemplate){Promise}
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 Resolves to an object with the following properties: Property Type Description url String URL to the exported printout.