About result map services in REST applications

The typical output of a geoprocessing REST service is a JSON representation. The clients interpret the JSON and define symbology accordingly. However, if the service has been published with a Result Map Service option, the geoprocessing server creates an accompanying map service with visual representation of outputs. The Result map Service can be added to web maps and web applications.

How is a geoprocessing service published with a result map service option?

The View results with a Map Service option is enabled when publishing a geoprocessing service. You can also enable this option for a published service by editing the geoprocessing service property through ArcGIS Server Manager or ArcGIS for Desktop.

Learn more about geoprocessing service properties

What are the layers in a result map service?

A result map service creates a layer for each output parameter. The layer ordering will correspond to the order of the output parameters as defined in geoprocessing task description.

Does a result map service contain layers for all output parameters?

A Result Map Service will contain a layer for all geodataset output parameters such as GPFeatureRecordsetLayer, GPRasterDataLayer and GPRecordSet. Scalar outputs such as GPDate, GPDouble, GPLong, GPBoolean, GPDataFile, and GPLinearUnit cannot be represented as a map and no layer will be returned for these parameters.

Output parameters of data type GPString are a special case. Geoprocessing outputs of GPString can be scalar or can be a reference to a geodataset such as TIN, CAD Layer, or Geostatistical Layer. If the output is a reference to geodataset, the Result Map Service will contain a layer.

Where does the symbology of the map service layers come from?

The symbology of the layers is based on the symbology defined by the author of the service.

Learn more about defining output symbology for geoprocessing tasks

How are result map services and layers accessed?

A Result Map Service is created for every successful asynchronous job. An asynchronous geoprocessing job is identified by a unique jobId. A result map service is accessed using the jobID as shown below:

http://<arcgis rest services>/<GPServiceName>/MapServer/jobs/<jobID>

The layers in a Result Map Service are accessed similar to map service layers based on the order of the layers.

http://<arcgis rest services>/<GPServiceName>/MapServer/jobs/<jobID>/0
http://<arcgis rest services>/<GPServiceName>/MapServer/jobs/<jobID>/1

What are the supported operations and functionalities?

The result map service is a dynamic map service and supports all operations and child resources of a typical dynamic map service.:

Map Service Operations:

Child Resources:

A Result Map Service is also time-aware and supports querying and exporting maps based on time.

How is a result map service added in web applications?

You can use the jobId and add result map service as a Dynamic Map Service layer in web apps. Also, you can access any of the feature layers in a result map service independently and add them as feature layers in web map.

Learn more about using result map service in web applications

What is the life span of result map services?

The lifespan of a Result Map Services is determined by the Maximum file age property of arcgisjobs directory. The default value is 360 minutes but can be modified by server administrator through ArcGIS Server Manager or ArcGIS for Desktop. The illustration below shows the Edit Directory dialog box in ArcGIS Server Manager and the settings of the arcgisjobs directory, including Maximum file age.

This is required

CautionCaution:

The maximum file age property applies to all the asynchronous jobs and associated result map services in the arcgisjobs directory. Modifying it will affect all jobs and result map services created in the arcgisjobs directory.

Related Topics

5/6/2015