1

Recently I encountered a problem on creating print service with "Export Web Map" server tool. I am unable to ask it on GeoNet so I decided to ask here instead.

When Export Web Map shared as Geoprocessing Service, it accept a JSON to understand what it is going to export, here, I passed in a map service with labeled layer. . . . { "id": "LayerWithLabel", "url": {{url}}, "title": "{{title}}", "opacity": 0.5, "visibility": true, "minScale": null, "maxScale": null, "visibleLayers": [ 0 ], "layers": [ { "id": 0, "layerDefinition": { "definitionExpression": {{definition string}}, } } ] } . . .

settings applied in mxd

While this layer display as expected in our system with ArcGIS javascript api, It always got tiled-like duplicate labels in the Export Web Map result. what the feature look like in our system unexpected duplicate labels in the Export Web Map result

Are there any extra options in Export Web Map specification needed to remove the duplicate labels? Or is it a bug? I need something to reply to our clients.

  • Does provide the full Web_Map_as_JSON I used for calling "Export Web Map" helps to track down the problem? – Incognitoo May 10 '18 at 7:32
0

At last I got the answer somewhere else. The root cause of such duplicates comes from the size of the output image. When it is larger than the map service's maxImageHeight and/or maxImageWidth, the print service makes multiple requests in tiled fashion the map service attempting to fill up the output image, end up with tiled-like duplicate labels in the "Export Web Map" result.

In "Export Web Map" with JSON representation of the map, the size of the output image depends on dpi and outputSize under exportOptions

{
 "mapOptions": {},
 "operationalLayers": [],
 "baseMap": [],
 "exportOptions" : {
  "dpi" : <dpi>,
  "outputSize" :  [
   <width>,
   <height>
  ]
 }
 "layoutOptions": {}
}

In my case, I accidentally set the dpi to 500, while The default is 96.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.