When you attempt to print a map using the Printing
geoprocessing service included with ArcGIS Server, you must provide a JavaScript Object Notation (JSON) representation of the map, including its layer and extent information. The JSON must be structured according to the Esri Export
specification.
When you use the ArcGIS Web APIs, you don't need to worry about constructing the JSON; the APIs take care of it for you. However, this topic is included for reference in case you ever need to construct the JSON yourself. This might happen if you need to call the Printing
service directly or run its source geoprocessing tool Export Web Map from another application.
New at ArcGIS Enterprise 11.4
The legend
provides option to turn off or on dynamic legend capability. It is available at operation-layer level allowing each layer be opted in or out of dynamic legend capability. This capability makes a legend element only to show legend patches for visible features in the current extent when true. Otherwise, it includes all legend patches from the layer's renderer.
New at 11.3
- A table element inside
layout
provides option to alter row order using one or more fields, or which fields to show. Or limit how many row you want to see. For this useOptions order
andBy Fields row
respectively.Count
New at 11.2
- You can have attributes printed out in two forms:
- Layout templates with dynamic text elements
- Report templates
- Added support to work with dynamic text element, table frame element and chart frame element in a layout. You need to use
element
insideOverrides layout
for that. Notes: You can use a print serviceOptions Get Layout Templates Info
task to find out if a layout template has any of these types of elements. - A new task can be added to your print service named
Get Report Templates Info
to retrieve elements inside report templates that can be overridden at run time. - To support overriding report template elements, a new element
report
at the top level of Export Web Map specifications.Options
New at 11.1
- Both
Export Web Map
andGet Layout Templates Info
tasks are enhanced with aLayout
parameter. This allows you to pass in the id of a portal item of layout type. Thus eliminate the need to republish your print service when a new layout template is needed._Item _ID - the item must be in the same portal where the server, print service running off, is federated with.
- Added a new property,
layer
, forType operational
. TheLayer layer
property specifies the layer type.Type
New at 11.0
- Added support to turn visibility on or off for a north arrow element in a layout. You need to use
element
insideOverrides layout
for that. Note: You can use a print serviceOptions Get
task to find out if a layout template has a north arrow.Layout Template Infos
The web map is made of five top-level objects:
{
"mapOptions": {},
"operationalLayers": [],
"baseMap": [],
"exportOptions": {},
"layoutOptions": {},
"reportOptions": {}
}
mapOptions
The object map
is required and defines map display properties.
Syntax: | Example |
---|---|
|
|
Description | |
|
operationalLayers
The operational
list contains all the operational layers to be displayed in the map. The order of the array defines the order of the layers in the map. The type of each layer is defined by the URL resource response. If the resource cannot be determined from the URL, the type property defines the type. For example, a WMS layer requires that you specify "type"
. There are some properties common to all types of operational layers, while others are specific to each type of operational layer.
In case of secured layers, specify the token in a layer definition. A user name and password are not supported as part of the URL. Services that are secured using OAuth2 authentication is not supported.
Syntax for operational layers |
---|
|
Description |
|
Syntax for a map service layer | Example |
---|---|
|
|
Description | |
|
Syntax for a feature layer | Example |
---|---|
|
|
Description | |
|
Syntax for an image service layer | Example |
---|---|
|
|
Description | |
Syntax for a WMS service layer |
---|
|
Description |
|
Syntax for a KML layer | Example |
---|---|
|
|
Description | |
|
Syntax for a client-side image | Example |
---|---|
|
|
Description | |
|
Syntax for client side graphics | Example |
---|---|
|
|
Description | |
|
Syntax for Comma-Separated Values (CSV) file by URL | Example |
---|---|
|
|
Description | |
|
Other properties
Syntax to define for a temporal renderer | Example |
---|---|
|
|
Syntax to define a | |
| |
Syntax to define an | |
| |
Description | |
|
Geoprocessing result
There are two ways a geoprocessing result can be included:
-
When a geoprocessing result comes back as a feature set and is drawn as graphics on the client side, send the result as a feature collection.
-
When the result is drawn by a job's result map service, add a new map service layer in
operational
and set the URL property to point to the endpoint of the result. For example:Layers - Geoprocessing result from 10.1 or later version:
https
://gisserver.domain.com :6080/arcgis/rest/services/ GP Job Map Service Name/ Map Server/jobs/job _id - Geoprocessing result from 10.0 and previous:
https
://gisserver.domain.com/arcgis/rest/services/ GP Service Name/ GP Server/ GP Task Name/jobs/job _id/results/out _param _name
- Geoprocessing result from 10.1 or later version:
Example: Geoprocessing result as an operational layer that is drawn by a job result map service
"operationalLayers": [
{
"url": "https://gisserver.domain.com:6080/arcgis/rest/services/Buffer/MapServer/jobs/j9aa6c36d59f44829a0daeadb2d0ff87b",
"title": "Geoprocessing Result"
}
]
baseMap
The map contains one baseMap, which has a title, and a base
property that contains an ordered list of base
. Each base
must be in the same spatial reference and tiling scheme. When there is a base
, it defines the map's spatial reference.
Syntax for baseMap | Example |
---|---|
|
|
Syntax for Vector Tile Layer as | Example |
---|---|
|
|
Syntax for Bing Maps as a | Example |
---|---|
|
|
Syntax for as a | Example |
---|---|
|
|
Description | |
|
Syntax for as a | Example |
---|---|
|
|
Description | |
|
Syntax for WMTS as a |
---|
|
exportOptions
This object specifies settings for the output map.
Syntax | Example |
---|---|
|
|
Description | |
|
layoutOptions
This defines settings for different available page layout elements and is only needed when an available layout template is chosen. Page layout elements include title, copyright text, scale bar, author name, custom and dynamic text element, chart frame element and table frame element.
All the properties of this object are optional. When a value of a property is specified, the value of the corresponding page layout element is replaced; otherwise, the existing element is left untouched.
ExportWebMap custom text element | Corresponding dynamic text in |
---|---|
|
|
|
|
|
|
Syntax | Example |
---|---|
|
|
Description | |
|
reportOptions
This defines settings for different available report elements and is only needed when an available report template is chosen. Report elements include source and related source ids, field list etc.
Send request to Get Report Templates Info
task to retrieve what elements are available for each report template.
Syntax | Example |
---|---|
|
|
Description | |
| |
Limitations
Feature-level symbols overridden in notes layers are not supported when the renderer type is class breaks or simple.