Export Web Map (Server Tools)
Summary
Returns a printable page layout or basic map of a specified area of interest based on the state of a web app (for example, included services, layer visibility settings, and client-side graphics).
Usage
The input for this tool is text in JSON format describing the layers, graphics, and other settings in the web map. The JSON representation must be structured according to the ExportWebMap specification.
This tool is included in ArcGIS Server to support web services for printing, including the
PrintingToolspreconfigured service. ArcGIS API for JavaScript uses thePrintingToolsservice to generate images for map printing.For advanced printing scenarios, such as swapping service layers for local vector data or creating map books, use the
ConvertWebMapToArcGISProjectfunction in the Pythonarcpy.mpmodule instead of this tool. To make a Python script available to a web app, you can expose the script through an ArcGIS Server geoprocessing service. For more information, see Printing in web applications in the ArcGIS Server help.The TIFF export format type generates a geo-enabled 32-bit
.tifffile with an alpha channel.The folder specified in the Templates Folder parameter cannot contain two or more files (
.rpttand.rptx) with identical names. This is to avoid undesirable outputs during print jobs. Layout and report templates can share the same name.If a report template is used or specified, the output must be in PDF format.
To generate a report with no maps from the print service, specify a Report Template parameter value, and for the Layout Template parameter, specify
MAP_ONLY.
Parameters
| Label | Explanation | Data type |
|---|---|---|
|
Web Map as JSON |
A JSON representation of the state of the map that will be exported as it appears in the web app. See the ExportWebMap specification to understand how to format this text. Use ArcGIS API for JavaScript to get this JSON string from the map. |
String |
|
Output File |
The output file name. The extension of the file depends on the Format parameter value. |
File |
|
Format (Optional) |
Specifies the format in which the map image for printing will be delivered. Note:The background of the output file is always opaque.
|
String |
|
Templates Folder (Optional) |
The full path to the folder containing layout or report pages ( |
Folder |
|
Layout Template (Optional) |
The name of a template from the list or the keyword |
String |
|
Layout Item ID (Optional) |
The portal ID (in JSON format) of the layout item that will be used for templates. Use the format: |
String |
|
Report Template (Optional) |
The name of the report template. When this parameter value is provided, the Format parameter must be set to Portable Document Format (PDF). When no value is provided, the output file will not contain any reports. |
String |
|
Report Item ID (Optional) |
The portal ID (in JSON format) of the report item that will be used for templates. Use the format: |
String |
Environments
This tool does not use any geoprocessing environments.
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes