English

How To: Execute a simple Export Web Map task operation from the REST endpoint

Summary

The Export Web Map task is an operation of the PrintingTools geoprocessing service that 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.

The PrintingTools service
Export Web Map Task

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.

ExportWebMap specification

Procedure

Executing the Export Web Map task through the REST endpoint serves as 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


    [O-Image]
  2. Enter values for the Web Map as JSON, Format and Layout Template parameters.

    A sample web map as JSON can be found below:

    Code:
    {
    "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

  3. Execute the task.