Rest services JSON incomplete drawingInfo

1447
3
12-11-2014 12:48 PM
SteveClark
New Contributor III

We have a third-party javascript app that needs to read the json of our rest services in order to display the layers properly. However, the drawingInfo in the layer's json is incomplete. Here's an example:

"uniqueValueInfos": [

  {

  "symbol": {

  "type": "esriSLS",

  "style": "esriSLSDash",

  "color": [

  230,

  0,

  0,

  255

  ],

  "width": 3.5

  },

  "value": "1, 1",

  "label": "CSU Preliminary",

  "description": ""

  },

  {

  "symbol": {

  "type": "esriSLS",

  "style": "esriSLSSolid",

  "color": [

  0,

  0,

  0,

  255

  ],

  "width": 8.400001525878906

  },

  "value": "1, 2",

  "label": "CSU Final",

  "description": ""

  },

  {

  "symbol": {

  "type": "esriSLS",

  "style": "esriSLSSolid",

  "color": [

  197,

  0,

  255,

  255

  ],

  "width": 3.5

  },

  "value": "1, 4",

  "label": "CSU Warranty",

  "description": ""

There are three line symbols: a dashed red line, a solid green line with black arrows and a solid purple line. If the line has an arrow, the json will only display that symbol, as in the case of the middle renderer where it only shows the size 8 black arrow and not the solid green line. The third-party app will render this layer as a solid black line.

How to get a more complete displayInfo in the json so all of the layers can be rendered properly?

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus

Steve,

   Cartographic Line symbology is not supported by ArcGIS Server in its drawingInfo. You can find this stated in the ArcGIS Server help docs.

0 Kudos
SteveClark
New Contributor III

I understand, Robert. However, I am wondering since the JavaScript API knows how to fully render these three symbols, where is it getting that information? Is there an API call that can read from Json that gets all of the rendering information beyond what is shown in the REST Json?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Steve,

   If you are using FeatureLayers then the rendering info will be retrieved from the REST endpoint and because ArcGIS Server does not support cartographic line symbols then the line will be drawn with a default symbol. Now if you are using an ArcGISDynamicMapServiceLayer then the layer is actually just getting an image from ArcGIS Server and the Server is rendering the image (which allows for cartographic line symbols). Hope this explains things.

0 Kudos