AnsweredAssumed Answered

Class breaks renderer exclusion-clause not applied after updateLayerFromJSON()

Question asked by vknezevic on Jun 2, 2017
Latest reply on Jun 5, 2017 by vknezevic



I am creating a high-resolution print geoprocessing service in ArcGIS Server 10.5, and I noticed that class breaks renderer's defaultSymbol passed  in JSON to the updateLayerFromJSON() is not shown on the map, even though it is shown correctly in the legend. The polygons that should be represented by that symbol are simply not present.


In effect, this means that updateLayerFromJSON() cannot be used to represent a layer rendered with class breaks renderer with a defaultSymbol/defaultLabel.


Basically, I am sending to the custom print service a webmap that contains a client-side feature layer rendered with class breaks renderer that uses a defaultSymbol for features outside of range.

  1. By opening the generated MXD file saved immediately after ConvertWebMapToMapDocument() was called, I see that the renderer is created correctly, it has the exclusion clause set, and the out-of-range features are shown on the map:
  2. After that, if I apply updateLayerFromJSON() to the same layer (renamed) using the exact renderer info that was already present in the webmap, the class break infos are correct, but the exclusion clause is empty, and the out-of-range features are not shown on the map:

Here's the contrived version of the drawingInfo section of the webmap:


 In case you are wondering why I'm reapplying the symbology if it was correct, the issue is that my polygon layer passed to the geoprocessing service gets split into two layers after ConvertWebMapToMapDocument(): an outline and a fill polygon layer. As a result, the two of them combined look correctly on the map, but I remain with two entries in the legend - one showing only an outline, the other showing only a fill (and I need both):


To overcome this, I remove one of them, and use updateLayerFromJSON() to reapply the symbology from the webmap to the remaining one. It works apart from removing the class break renderer exclusion clause from the layer:


Is this a bug in updateLayerFromJSON() and does anyone know if there are workarounds?