Method Overview
Name | Return Type | Summary | Object |
---|---|---|---|
Promise<object> | Sends a request to the server to execute a synchronous GP task. more details | geoprocessor | |
Promise<JobInfo> | Submits a job to the server for asynchronous processing by the GP task. more details | geoprocessor |
Method Details
-
Sends a request to the server to execute a synchronous GP task.
The results can be retrieved using the fetchResultData(), fetchResultImage(), or fetchResultMapImageLayer() methods.
Parametersurl StringURL to the ArcGIS Server REST resource that represents a Geoprocessing service.
params ObjectoptionalSpecifies the input parameters accepted by the task and their corresponding values. These input parameters are listed in the parameters field of the associated GP Task resource. For example, assume that a GP Task resource has the following input parameters:
<GPFeatureRecordSetLayer>
Input_Points<GPDouble>
Distance
The
params
argument would then be an Object of the form:{ Input_Points: <FeatureSet>, Distance: <Number> }
options GPOptionsoptionalspecifies the input options for the geoprocessing service return values. The
options
argument could be an Object of the form:{ returnZ: true }
requestOptions ObjectoptionalAdditional options to be used for the data request (will override requestOptions defined during construction).
ReturnsType Description Promise<object> When resolved, returns an object with the following properties:
See the GPMessage and ParameterValue classes for more information about the information in this object.{ messages: <GPMessage[]>, results: <ParameterValue[]> }
-
Submits a job to the server for asynchronous processing by the GP task. The method will resolve immediately after the job has been submitted to the server. Use waitForJobCompletion() to be notified when the job has completed and optionally periodic job status.
The results can be retrieved using the fetchResultData(), fetchResultImage(), or fetchResultMapImageLayer() methods.
Parametersurl StringURL to the ArcGIS Server REST resource that represents a Geoprocessing service.
params Objectoptionalspecifies the input parameters accepted by the task and their corresponding values. These input parameters are listed in the parameters field of the associated GP Task resource. For example, assume that a GP Task resource has the following input parameters:
<GPFeatureRecordSetLayer>
Input_Points<GPDouble>
Distance
The
params
argument would then be an Object of the form:{ Input_Points: <FeatureSet>, Distance: <Number> }
options GPOptionsoptionalspecifies the input options for the geoprocessing service return values. The
options
argument could be an Object of the form:{ returnZ: true }
requestOptions ObjectoptionalAdditional options to be used for the data request (will override requestOptions defined during construction).
ReturnsType Description Promise<JobInfo> When resolved, returns a JobInfo.