Printing Tools (gpserver)

2283
1
08-23-2012 08:56 AM
p_thibault
New Contributor
I am working with teh export web map task utility.  in the 'web map as json' input box i have:


{
"href": "http://gistest2:6080/arcgis/rest/services/basemap/MapServer",
"width": 400,
"height": 400,
"extent": {
  "xmin": 533577.31183999323,
  "ymin": 931697.99341274076,
  "xmax": 895055.15751842246,
  "ymax": 1293175.8390911701,
  "spatialReference": {
   "wkid": 102715,
   "latestWkid": 2260
  }
},
  "scale": 1041056.1955538762,
  "exportOptions":{
  "dpi": 300,
  "outputSize": [500,500]
},
"layoutOptions":{
  "titleText": "City Land Use Map",
  "authorText": "Print by: XYZ",
  "copyrightText": "esri",


}
}

The "format" input box I entered:  GIF
the Layout Template box:  (i left empty).


There is no error but the reponse back looks like "http://gistest2:6080/arcgis/rest/directories/arcgisoutput/Utilities/PrintingTools_GPServer/_ags_2519..." is always a blank map.  I know that the url to the map service works.  Can someone see something obvious in the syntax of the json string?
0 Kudos
1 Reply
TanuHoque
Esri Regular Contributor
Unfortunately it seems like the JSON attached to the post is incomplete. Besides that, here are few issues that I have noticed:

  • I don't see "mapOptions" element where "scale" and "extent" should go

  • atleast "operationalLayers" or "baseMap" needs to be there


Quick question: how are you generating the JSON? Are you using any of ArcGIS Web APIs (java, flext or silverlight) or you are generating it programatically?

In case you use ArcGIS Web API, please use PrintTask and you don't need to worry about generating this JSON. If it is the later case, then please check Web_Map_as_JSON's specification here: http://resources.arcgis.com/en/help/rest/apiref/gp_exportwebmaptask.html
0 Kudos