HOW TO

Execute a Export Web Map task operation from the REST endpoint

Last Published: July 30, 2021

Summary

The Export Web Map task is an operation of the PrintingTools geoprocessing service which takes the state of a web application and returns either a page layout or map image of the specified area of interest in raster or vector format. Refer to ArcGIS Server: The PrintingTools service and ArcGIS REST API: Export Web Map Task for more information.

The input for the Export Web Map task is formatted using JavaScript object notation (JSON), and should contain information about the layers, graphics and other settings within the web map. Refer to ArcGIS Server: ExportWebMap specification for more information.

Procedure

Executing the Export Web Map task through the REST endpoint is an effective way to confirm that the PrintingTools geoprocessing service, or any custom print service, is working as expected prior to consuming it within a web application.

  1. Access the Execute Web Map task operation from the REST endpoint:
http://<gisserver.domain.com>:6080/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task/execute
The Execute Task page in the ArcGIS REST endpoint
  1. Enter values for the Web Map as JSON, Format and Layout Template parameters. A sample web map as JSON can be found below:
Note:
The following JSON code section does not work if it is formatted. Starting in 10.6, print services do not accept formatted JSON. However, if publishing a print service from ArcMap (with the Export Web Map geoprocessing tool) on a 10.6 or above server, formatted JSON can be used.
{"mapOptions":{"extent":{"xmin":-14029324.953095315,"ymin":3275060.5972898453,"xmax":-6803885.543356096,"ymax":7545750.241638077,"spatialReference":{"wkid":102100}},"scale":18489297.737236},"operationalLayers":[{"url":"http://<gisserver.domain.com>:6080/arcgis/rest/services/SampleWorldCities/MapServer",}],"exportOptions":{"outputSize":[1400,1000],"dpi":96}}

This sample is configured to consume the Sample World Cities map service:

http://<gisserver.domain.com>:6080/arcgis/rest/services/SampleWorldCities/MapServer
  1. Execute the task.

Article ID:000012690

Software:
  • ArcGIS Server

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic