HOW TO
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.
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.
http://<gisserver.domain.com>:6080/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task/execute
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
Get help from ArcGIS experts
Download the Esri Support App