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

1572
2
06-02-2017 08:44 AM
VladimirKnezevic1
Deactivated User

Hi!

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?

Thanks,

Vladimir

0 Kudos
2 Replies
JoshuaBixby
MVP Esteemed Contributor

After poking around this morning, I can replicate the issue.  The interesting aspect of this issue is the symbology exclusion clause seems to be generated dynamically when importing the map into ArcMap.  After loading a map into ArcMap and using .arc_object.getSymbology(), there is no SQL present or anything referring to data exclusion.  So, whatever appears to be dynamically generating when importing the map isn't getting triggered when updating the layer from JSON.  Even more interesting is that no data exclusion clause is created when opening the map in ArcGIS Pro.

To me, this seems like a bug.  That said, it appears to be more of an ArcMap issue and not ArcMap and ArcGIS Pro, so I don't know how motivated Esri will be to address it.  Unfortunately, I couldn't figure out a workaround.

VladimirKnezevic1
Deactivated User

Hi Joshua,

Thanks for investing your time into this.

It is a kind of dead end for me, as it seems like the map with a polygon class breaks symbolization can not be recreated properly on the server side in the high resolution print service.

This looks like a similar issue related to ArcGIS Pro:Apply LYRX file symbology exclusion clause

0 Kudos