<?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 Problem with GenerateRendererTask() and setLayerDefinitions()  10.4 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-generaterenderertask-and/m-p/684975#M63777</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;I'm using the JS API v.3.20 GenerateRendererTask() and ClassBreaksDefinition() to render classes and allow the user to customize the map data. &amp;nbsp;It works fine for the entire layer, but as soon as I set layer definitions the map does not export properly. &amp;nbsp;The renderer appears to be working because the classes are set correctly in the legend with the correct symbols applied. &amp;nbsp;The strange thing is that if I change to a simpleRenderer, I can render a custom symbol on the map and in the legend. &amp;nbsp;I need it to work with class breaks though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been struggling with this for some time now. &amp;nbsp;Here is a link to a js fiddle from a customized esri sample. &amp;nbsp;Uncomment the block at line 103 to see how setting layerDefinitions breaks the map output. &amp;nbsp;&amp;nbsp;&lt;A class="link-titled" href="https://jsfiddle.net/q7veo0zw/" title="https://jsfiddle.net/q7veo0zw/"&gt;Edit fiddle - JSFiddle&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also attached the html file. &amp;nbsp;Can anyone explain why the full layer renders properly, but a subset of the layer does not? &amp;nbsp;Myself and entire team have tried multiple variations and are stumped!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 May 2017 15:28:58 GMT</pubDate>
    <dc:creator>ErikMyers</dc:creator>
    <dc:date>2017-05-12T15:28:58Z</dc:date>
    <item>
      <title>Problem with GenerateRendererTask() and setLayerDefinitions()  10.4</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-generaterenderertask-and/m-p/684975#M63777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;I'm using the JS API v.3.20 GenerateRendererTask() and ClassBreaksDefinition() to render classes and allow the user to customize the map data. &amp;nbsp;It works fine for the entire layer, but as soon as I set layer definitions the map does not export properly. &amp;nbsp;The renderer appears to be working because the classes are set correctly in the legend with the correct symbols applied. &amp;nbsp;The strange thing is that if I change to a simpleRenderer, I can render a custom symbol on the map and in the legend. &amp;nbsp;I need it to work with class breaks though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been struggling with this for some time now. &amp;nbsp;Here is a link to a js fiddle from a customized esri sample. &amp;nbsp;Uncomment the block at line 103 to see how setting layerDefinitions breaks the map output. &amp;nbsp;&amp;nbsp;&lt;A class="link-titled" href="https://jsfiddle.net/q7veo0zw/" title="https://jsfiddle.net/q7veo0zw/"&gt;Edit fiddle - JSFiddle&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also attached the html file. &amp;nbsp;Can anyone explain why the full layer renders properly, but a subset of the layer does not? &amp;nbsp;Myself and entire team have tried multiple variations and are stumped!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 15:28:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-generaterenderertask-and/m-p/684975#M63777</guid>
      <dc:creator>ErikMyers</dc:creator>
      <dc:date>2017-05-12T15:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with GenerateRendererTask() and setLayerDefinitions()  10.4</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-generaterenderertask-and/m-p/684976#M63778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suggest trying the SmartMapping API to achieve this. Here's a sample showing how to generate class breaks:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jssamples/smartmapping_classesbycolor.html" title="https://developers.arcgis.com/javascript/3/jssamples/smartmapping_classesbycolor.html"&gt;Smart Mapping - Render class breaks with color | ArcGIS API for JavaScript 3.20&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since it looks like you're using dynamic layers, you can construct a FeatureLayer from one of the sublayers to generate the renderer and apply it to the drawingInfo of the layer. That is the pattern used in this blog:&amp;nbsp;&lt;A class="link-titled" href="https://blogs.esri.com/esri/arcgis/2016/05/25/smart-mapping-with-dynamic-workspaces/" title="https://blogs.esri.com/esri/arcgis/2016/05/25/smart-mapping-with-dynamic-workspaces/"&gt;Smart Mapping with dynamic workspaces | ArcGIS Blog&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On a side note, the 4.x API will eventually remove the need for creating a FeatureLayer and allow you to directly reference the sublayer, making this process a lot simpler. Hope that helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 16:49:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-generaterenderertask-and/m-p/684976#M63778</guid>
      <dc:creator>KristianEkenes</dc:creator>
      <dc:date>2017-05-16T16:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with GenerateRendererTask() and setLayerDefinitions()  10.4</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-generaterenderertask-and/m-p/684977#M63779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi and thanks for the reply. &amp;nbsp;Unfortunately, I won't be able to use FeatureLayer because I need to render and display hundreds of thousands of features in (near) future versions of this app. &amp;nbsp;I will add some interesting information that our team uncovered in the meantime.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We found that the the renderer was correct and that an image was being exported from the server, but as f: "JSON" instead of f: "image". &amp;nbsp;There was also inconsistency about whether the request was a GET or POST. &amp;nbsp;This error was only occurring when the where clause was included in the request so we suspected it to be a bug in the API. &amp;nbsp;We decided to try some different settings on the server side to see if we could get the correct image response.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the end, we changed the&amp;nbsp;Anti-Aliasing service Parameter from "None" to "Fastest" and the issue seems to have been resolved for now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2017 16:59:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-generaterenderertask-and/m-p/684977#M63779</guid>
      <dc:creator>ErikMyers</dc:creator>
      <dc:date>2017-05-18T16:59:14Z</dc:date>
    </item>
  </channel>
</rss>

