<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Class breaks renderer exclusion-clause not applied after updateLayerFromJSON() in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/class-breaks-renderer-exclusion-clause-not-applied/m-p/18560#M1446</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am creating a high-resolution print geoprocessing service in ArcGIS Server 10.5, and I noticed that class breaks renderer's &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;defaultSymbol&lt;/SPAN&gt; passed &amp;nbsp;in JSON to the&amp;nbsp;&lt;SPAN style="color: #4d4d4d;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;updateLayerFromJSON()&lt;/SPAN&gt; is&amp;nbsp;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. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d;"&gt;In effect, this means that &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;updateLayerFromJSON()&lt;/SPAN&gt; cannot be used to represent a layer rendered with class breaks renderer with a &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;defaultSymbol/defaultLabel&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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 &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;defaultSymbol&lt;/SPAN&gt; for features outside of range.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;By opening&amp;nbsp;the generated MXD file saved immediately after&amp;nbsp;&lt;SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;ConvertWebMapToMapDocument()&lt;/SPAN&gt; was called, I see that the renderer is created correctly, it has the exclusion clause set, and the &lt;STRONG&gt;out-of-range features are shown on the map&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;IMG __jive_id="355353" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/355353_pastedImage_6.png" style="width: auto; height: auto;" /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;After that, if I apply&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;updateLayerFromJSON()&lt;/SPAN&gt; 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 &lt;STRONG&gt;out-of-range features are not shown on the map&lt;/STRONG&gt;:&lt;BR /&gt;&lt;IMG __jive_id="355354" class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/355354_pastedImage_7.png" style="width: auto; height: auto;" /&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Here's the contrived version of the &lt;SPAN&gt;drawingInfo&lt;/SPAN&gt;&amp;nbsp;section of the webmap:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="355356" class="image-5 jive-image" src="https://community.esri.com/legacyfs/online/355356_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d;"&gt;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp;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&amp;nbsp;&lt;SPAN style="color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;ConvertWebMapToMapDocument()&lt;/SPAN&gt;: an &lt;STRONG&gt;outline&lt;/STRONG&gt; and a &lt;STRONG&gt;fill&amp;nbsp;&lt;/STRONG&gt;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):&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;&lt;IMG __jive_id="355352" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/355352_pastedImage_5.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;To overcome this, I remove one of them, and use&amp;nbsp;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;updateLayerFromJSON()&lt;/SPAN&gt; 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:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;&lt;IMG __jive_id="355355" class="jive-image image-4" src="https://community.esri.com/legacyfs/online/355355_pastedImage_8.png" style="width: auto; height: auto;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;Is this a bug in&amp;nbsp;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;updateLayerFromJSON()&lt;/SPAN&gt; and does anyone know if there are workarounds?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;Vladimir&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Jun 2017 15:44:58 GMT</pubDate>
    <dc:creator>VladimirKnezevic1</dc:creator>
    <dc:date>2017-06-02T15:44:58Z</dc:date>
    <item>
      <title>Class breaks renderer exclusion-clause not applied after updateLayerFromJSON()</title>
      <link>https://community.esri.com/t5/python-questions/class-breaks-renderer-exclusion-clause-not-applied/m-p/18560#M1446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am creating a high-resolution print geoprocessing service in ArcGIS Server 10.5, and I noticed that class breaks renderer's &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;defaultSymbol&lt;/SPAN&gt; passed &amp;nbsp;in JSON to the&amp;nbsp;&lt;SPAN style="color: #4d4d4d;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;updateLayerFromJSON()&lt;/SPAN&gt; is&amp;nbsp;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. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d;"&gt;In effect, this means that &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;updateLayerFromJSON()&lt;/SPAN&gt; cannot be used to represent a layer rendered with class breaks renderer with a &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;defaultSymbol/defaultLabel&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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 &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;defaultSymbol&lt;/SPAN&gt; for features outside of range.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;By opening&amp;nbsp;the generated MXD file saved immediately after&amp;nbsp;&lt;SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;ConvertWebMapToMapDocument()&lt;/SPAN&gt; was called, I see that the renderer is created correctly, it has the exclusion clause set, and the &lt;STRONG&gt;out-of-range features are shown on the map&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;IMG __jive_id="355353" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/355353_pastedImage_6.png" style="width: auto; height: auto;" /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;After that, if I apply&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;updateLayerFromJSON()&lt;/SPAN&gt; 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 &lt;STRONG&gt;out-of-range features are not shown on the map&lt;/STRONG&gt;:&lt;BR /&gt;&lt;IMG __jive_id="355354" class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/355354_pastedImage_7.png" style="width: auto; height: auto;" /&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Here's the contrived version of the &lt;SPAN&gt;drawingInfo&lt;/SPAN&gt;&amp;nbsp;section of the webmap:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="355356" class="image-5 jive-image" src="https://community.esri.com/legacyfs/online/355356_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d;"&gt;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp;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&amp;nbsp;&lt;SPAN style="color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;ConvertWebMapToMapDocument()&lt;/SPAN&gt;: an &lt;STRONG&gt;outline&lt;/STRONG&gt; and a &lt;STRONG&gt;fill&amp;nbsp;&lt;/STRONG&gt;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):&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;&lt;IMG __jive_id="355352" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/355352_pastedImage_5.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;To overcome this, I remove one of them, and use&amp;nbsp;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;updateLayerFromJSON()&lt;/SPAN&gt; 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:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;&lt;IMG __jive_id="355355" class="jive-image image-4" src="https://community.esri.com/legacyfs/online/355355_pastedImage_8.png" style="width: auto; height: auto;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;Is this a bug in&amp;nbsp;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;updateLayerFromJSON()&lt;/SPAN&gt; and does anyone know if there are workarounds?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;Vladimir&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2017 15:44:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/class-breaks-renderer-exclusion-clause-not-applied/m-p/18560#M1446</guid>
      <dc:creator>VladimirKnezevic1</dc:creator>
      <dc:date>2017-06-02T15:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: Class breaks renderer exclusion-clause not applied after updateLayerFromJSON()</title>
      <link>https://community.esri.com/t5/python-questions/class-breaks-renderer-exclusion-clause-not-applied/m-p/18561#M1447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After poking around this morning, I can replicate the issue.&amp;nbsp; The interesting aspect of this issue is the symbology exclusion clause seems to be generated dynamically when importing the map into ArcMap.&amp;nbsp; After loading a map into ArcMap and using &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;.arc_object.getSymbology()&lt;/SPAN&gt;, there is no SQL present or anything referring to data exclusion.&amp;nbsp; So, whatever appears to be dynamically generating when importing the map isn't getting triggered when updating the layer from JSON.&amp;nbsp; Even more interesting is that no data exclusion clause is created when opening the map in ArcGIS Pro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To me, this seems like a bug.&amp;nbsp; 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.&amp;nbsp; Unfortunately, I couldn't figure out a workaround.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Jun 2017 15:32:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/class-breaks-renderer-exclusion-clause-not-applied/m-p/18561#M1447</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-06-04T15:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Class breaks renderer exclusion-clause not applied after updateLayerFromJSON()</title>
      <link>https://community.esri.com/t5/python-questions/class-breaks-renderer-exclusion-clause-not-applied/m-p/18562#M1448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joshua,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for investing your time into this.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This looks like a similar issue related to ArcGIS Pro:&lt;A href="https://community.esri.com/message/632379"&gt;Apply LYRX file symbology exclusion clause&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jun 2017 09:11:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/class-breaks-renderer-exclusion-clause-not-applied/m-p/18562#M1448</guid>
      <dc:creator>VladimirKnezevic1</dc:creator>
      <dc:date>2017-06-05T09:11:36Z</dc:date>
    </item>
  </channel>
</rss>

