Problem on Web Map Export for ArcGIS server 10.2

3078
3
03-22-2016 01:00 AM
Musa_SerkanArslan
New Contributor III

Hi Guys,

I am having problem with printing service which is working on ArcGIS server 10.2.

I am trying to a printout from web map export geoprocessing service and there some problems with Legend. Some times the legend is not visible. I am facing problem on different scenarios. I could not identify it exactly.

On below json, for id:1, if i add labelinginfo legend is unvisible but if i remove labelinginfo, legend is visible.

In another json, if i add "name" information for layer in english, legend is visible, but if i write some name in Arabic, legend is not visible.

So i want to know is there any one faced this type of problems?

{

  "operationalLayers": [

    {

      "id": "a",

      "url": "xxxxxxxxxxxxxxxxxxxx?token=xxxxxxxxx",

      "title": "MOA Map Layers",

      "opacity": 1,

      "visibility": true,

      "visibleLayers": [

        27,

        87,

        89,

        58,

      ],

      "layers": [

        {

          "id": 0,

          "layerDefinition": {

            "definitionExpression": "ISO_CC <> 'SA'",

            "name": "دول العالم",

            "drawingInfo": {

              "transparency": 50,

              "showLabels": true

            },

            "source": {

              "type": "mapLayer",

              "mapLayerId": 89

            }

          }

        },

        {

          "id": 1,

          "layerDefinition": {

            "definitionExpression": "DATA_SOURCE = 'Atlas Wadi'",

            "name": "الأودية الرئيسية",

            "drawingInfo": {

              "renderer": {

                "type": "simple",

                "symbol": {

                  "type": "esriSFS",

                  "outline": {

                    "type": "esriSLS",

                    "style": "esriSLSSolid",

                    "color": [

                      64,

                      101,

                      235,

                      255

                    ],

                    "width": 1

                  },

                  "style": "esriSFSSolid",

                  "color": [

                    1,

                    169,

                    230,

                    255

                  ]

                }

              },

              "transparency": 1,

              "showLabels": true,

              "labelingInfo": [

                {

                  "labelPlacement": "esriServerPolygonPlacementAlwaysHorizontal",

                  "labelExpression": "[NAME_AR]",

                  "symbol": {

                    "type": "esriTS",

                    "color": [

                      52,

                      52,

                      52,

                      255

                    ],

                    "verticalAlignment": "bottom",

                    "horizontalAlignment": "left",

                    "font": {

                      "family": "Arial",

                      "size": 10,

                      "style": "normal",

                      "weight": "bold",

                      "decoration": "none"

                    }

                  },

                  "minScale": 0,

                  "maxScale": 0,

                  "where": ""

                }

              ]

            },

            "source": {

              "type": "mapLayer",

              "mapLayerId": 58

            }

          }

        },

        {

          "id": 2,

          "layerDefinition": {

            "drawingInfo": {

              "transparency": 0.5

            },

            "source": {

              "type": "mapLayer",

              "mapLayerId": 27

            }

          }

        },

        {

          "id": 3,

          "layerDefinition": {

            "name": "حدود المناطق",

            "drawingInfo": {

              "renderer": {

                "type": "simple",

                "symbol": {

                  "type": "esriSFS",

                  "style": "esriSFSNull ",

                  "color": [

                    104,

                    104,

                    104,

                    255

                  ],

                  "outline": {

                    "type": "esriSLS",

                    "style": "esriSLSSolid",

                    "color": [

                      104,

                      104,

                      104,

                      255

                    ],

                    "width": 1.2

                  }

                },

                "label": "",

                "description": "<description>"

              },

              "transparency": 50

            },

            "source": {

              "type": "mapLayer",

              "mapLayerId": 87

            }

          }

        }

      ]

    }

  ],

  "baseMap": {

    "title": "Imagery",

    "baseMapLayers": [

      {

        "url": "xxxxxxxxxxxxxxx"

      }

    ]

  },

  "mapOptions": {

    "extent": {

      "xmin": 31.716,

      "ymin": 15.387,

      "xmax": 57.65,

      "ymax": 33.471,

      "spatialReference": {

        "wkid": 4326

      }

    },

    "scale": 7000000,

    "rotation": 0

  },

  "exportOptions": {

    "dpi": 96,

    "outputSize": [

      1899,

      883

    ]

  },

  "layoutOptions": {

    "titleText": "الأودية الرئيسية بالمملكة العربية السعودية",

    "copyrightText": " هذه الخريطة انتجت من خلال بوابة نظم المعلومات الجغرافية",

    "authorText": "",

    "legendOptions": {

      "operationalLayers": [

        {

          "id": "a",

          "sublayerIds": [

            0,

            1,

            2,

            3,4,5

          ]

        }

      ]

    }

  }

}

0 Kudos
3 Replies
GokuSan
New Contributor II

Could you solve it? In my case, the legend is exported almost correctly, but when the number of items of a class are more than 15 ( for example) the legend is not drawn in the output ( PDF ) . I have performed the steps indicating ESRI bug print on the web map export ; in other words, install the drivers of a plotter and set the paper size ( indicating a larger one that I want to export ) but the legend continues without appearing in the output.

Thanks in advance

0 Kudos
Musa_SerkanArslan
New Contributor III

I could not solve it.

0 Kudos
CarlosNantes
New Contributor III

For future reference.

I had similar problem this week, but it was not with the legend. I was using arcgis javascript api and trying to change the color (symbology) of the selected feature before sending the webmap json to the export webmap service. The problem was with the whole layerDefinition object. If it was present in the json, the layer was not shown in the exported map image. But if I removed the layerDefinition object, the layer was shown entirely in the final exported image.

It seems that for the configuration inside layerDefinition to work, the service for which you are changing symbology (or label) needs to support dynamic layers as described in the docs:

"... you can optionally choose to allow clients of the server to dynamically change layer appearance and behavior in your map service. Determining which layers will appear in a map, layer symbology, layer order and position, labeling, and more, can be achieved on the server through the use of dynamic layers."

The solution for me was to turn on the dynamic layers support for the service I wanted to change the symbology.

The steps for enabling dynamic layers support can be found here.

0 Kudos