<?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 Re: Generate Renderer issue in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441613#M40807</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;All the usual web debugging methods apply:&amp;nbsp; &lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;watch the request to generateDataClasses via your browser's dev tools and look at the response&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;console.log the response&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;use a breakpoint to inspect various variable values at runtime&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;BR /&gt;If you could post a complete but simplified version of your page so we can run and debug that would be helpful as well.&lt;BR /&gt;&lt;BR /&gt;I'd also like to encourage you to upgrade to 3.2 even though our generate renderer sample does indeed work with 2.8.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Derek,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried all these steps and followed the messages on web console but found no credible leads. I will try to create a simplified version which can be tested.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Samir&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Nov 2012 23:52:45 GMT</pubDate>
    <dc:creator>SamirGambhir</dc:creator>
    <dc:date>2012-11-19T23:52:45Z</dc:date>
    <item>
      <title>Generate Renderer issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441609#M40803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to generate a class breaks renderer using generateRenderer task, but the renderer object is not being returned. I am using ArcGIS Server 10.1 with Javascript API v=2.8. I am using the following esri example (&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/renderer_generate_renderer.html" rel="nofollow" target="_blank"&gt;Generate Renderer&lt;/A&gt;&lt;SPAN&gt;) to build my code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;function renderIndicator(ind, num, url) {&amp;nbsp; var classDef = new esri.tasks.ClassBreaksDefinition();&amp;nbsp; classDef.breakCount = num; //number of breaks&amp;nbsp; classDef.classificationField = ind; //field name&amp;nbsp; classDef.classificationMethod = "natural-breaks";&amp;nbsp; classDef.baseSymbol = symbol;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var colorRamp = new esri.tasks.AlgorithmicColorRamp();&amp;nbsp; colorRamp.fromColor = new dojo.colorFromHex('#ffff80');&amp;nbsp; colorRamp.toColor = new dojo.colorFromHex('#6B0000');&amp;nbsp; colorRamp.algorithm = "cie-lab";&amp;nbsp; // options are:&amp;nbsp; "cie-lab", "hsv", "lab-lch"&amp;nbsp; classDef.colorRamp = colorRamp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var params = new esri.tasks.GenerateRendererParameters();&amp;nbsp; params.classificationDefinition = classDef;&amp;nbsp; var generateRenderer = new esri.tasks.GenerateRendererTask(url); //url of a feature layer&amp;nbsp; generateRenderer.execute(params);&amp;nbsp; dojo.connect(generateRenderer, function(renderer) { &amp;nbsp; return renderer;&amp;nbsp; }); }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;The returned 'renderer' object is needed in another function to display features and generate a legend. It seems that dojo.connect is not working. What am I missing here?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Samir&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2012 19:34:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441609#M40803</guid>
      <dc:creator>SamirGambhir</dc:creator>
      <dc:date>2012-11-14T19:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Renderer issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441610#M40804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi,&lt;BR /&gt;I am trying to generate a class breaks renderer using generateRenderer task, but the renderer object is not being returned. I am using ArcGIS Server 10.1 with Javascript API v=2.8. I am using the following esri example (&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/renderer_generate_renderer.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Generate Renderer&lt;/A&gt;) to build my code.&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;function renderIndicator(ind, num, url) {
 var classDef = new esri.tasks.ClassBreaksDefinition();
 classDef.breakCount = num; //number of breaks
 classDef.classificationField = ind; //field name
 classDef.classificationMethod = "natural-breaks";
 classDef.baseSymbol = symbol;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var colorRamp = new esri.tasks.AlgorithmicColorRamp();
 colorRamp.fromColor = new dojo.colorFromHex('#ffff80');
 colorRamp.toColor = new dojo.colorFromHex('#6B0000');
 colorRamp.algorithm = "cie-lab";
 // options are:&amp;nbsp; "cie-lab", "hsv", "lab-lch"
 classDef.colorRamp = colorRamp;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var params = new esri.tasks.GenerateRendererParameters();
 params.classificationDefinition = classDef;
 var generateRenderer = new esri.tasks.GenerateRendererTask(url); //url of a feature layer
 generateRenderer.execute(params);
 dojo.connect(generateRenderer, function(renderer) {
&amp;nbsp; return renderer;
 });
}&lt;/PRE&gt;&lt;BR /&gt;The returned 'renderer' object is needed in another function to display features and generate a legend. It seems that dojo.connect is not working. What am I missing here?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Samir&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I check if the renderer object has been created without applying it in this code? I suspect my code is not generating an object. Any suggestions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Samir&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:45:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441610#M40804</guid>
      <dc:creator>SamirGambhir</dc:creator>
      <dc:date>2021-12-11T19:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Renderer issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441611#M40805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;How do I check if the renderer object has been created without applying it in this code? I suspect my code is not generating an object. Any suggestions?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Samir&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the complete code (and still unresponsive) for generating a renderer using Natural Breaks method:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
function inti(){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mapM = new esri.Map("mapM", {
&amp;nbsp; extent : iniExtent
 });
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stateFeatureLayer = new esri.layers.FeatureLayer("http://localhost:6080/arcgis/rest/services/State_profile/MapServer/1", {
&amp;nbsp; mode : esri.layers.FeatureLayer.MODE_ONDEMAND,
&amp;nbsp; outFields : ["*"],
&amp;nbsp; id : "stateFeatureLayer",
&amp;nbsp; infoTemplate : infoTemplate
 });
 distFeatureLayer = new esri.layers.FeatureLayer("http://localhost:6080/arcgis/rest/services/District_profile/MapServer/1", {
&amp;nbsp; mode : esri.layers.FeatureLayer.MODE_ONDEMAND,
&amp;nbsp; outFields : ["*"],
&amp;nbsp; id : "distFeatureLayer",
&amp;nbsp; infoTemplate : infoTemplate
 });
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...
}

function queryParams(newGeog, indc, indv, myURL){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (mapM.infoWindow) {
&amp;nbsp; mapM.infoWindow.hide();
 }
 if (flag === true) { //flag value returned from another function, and this value has been verified
&amp;nbsp; myURL = "http://localhost:6080/arcgis/rest/services/State_profile/MapServer/1";
&amp;nbsp; queryTask = new esri.tasks.QueryTask(myURL);
 } else if (flag === false) {
&amp;nbsp; myURL = "http://localhost:6080/arcgis/rest/services/District_profile/MapServer/1";
&amp;nbsp; queryTask = new esri.tasks.QueryTask(myURL);
 }
 query = new esri.tasks.Query();
 query.returnGeometry = true;
 query.outFields = ["*"];
 query.where = "1=1";
 queryTask.execute(query);
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var defaultFrom = new dojo.colorFromHex('#ffff80');
 var defaultTo = new dojo.colorFromHex('#6B0000');
 var resultContent = "&amp;lt;tr&amp;gt;" + indc + ": &amp;lt;td&amp;gt;${" + indv + ":formatNumber}&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;"; //'indc' is the name of the indicator and 'indv' is its value
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var classDef = new esri.tasks.ClassBreaksDefinition();
 classDef.breakCount = 3;
 classDef.classificationField = indv;
 classDef.classificationMethod = "natural-breaks";
 
 var colorRamp = new esri.tasks.AlgorithmicColorRamp();
 colorRamp.fromColor = defaultFrom;
 colorRamp.toColor = defaultTo;
 colorRamp.algorithm = "cie-lab"; // options are:&amp;nbsp; "cie-lab", "hsv", "lab-lch"
 classDef.colorRamp = colorRamp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var params = new esri.tasks.GenerateRendererParameters();
 params.classificationDefinition = classDef;
 var generateRenderer = new esri.tasks.GenerateRendererTask(myURL);
 generateRenderer.execute(params);
 dojo.connect(generateRenderer, "onComplete", function(renderer) {
&amp;nbsp; if (flag === true) {
&amp;nbsp;&amp;nbsp; infoTemplate.setTitle("&amp;lt;tr&amp;gt;State: &amp;lt;td&amp;gt;${State_name}&amp;lt;/tr&amp;gt;&amp;lt;/td&amp;gt;");
&amp;nbsp;&amp;nbsp; stateFeatureLayer.setRenderer(renderer);
&amp;nbsp;&amp;nbsp; stateFeatureLayer.refresh();
&amp;nbsp; } else if (flag === false) {
&amp;nbsp;&amp;nbsp; infoTemplate.setTitle("&amp;lt;tr&amp;gt;DISTRICT: &amp;lt;td&amp;gt;${Dist_name}&amp;lt;/tr&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;tr&amp;gt;STATE: &amp;lt;td&amp;gt;${State_name}&amp;lt;/tr&amp;gt;&amp;lt;/td&amp;gt;");
&amp;nbsp;&amp;nbsp; var strNewGeog = "State_name= '" + newGeog[0] + "'";
&amp;nbsp;&amp;nbsp; if (newGeog.length &amp;gt; 1) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for ( i = 1; i &amp;lt; newGeog.length; i++){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strNewGeog += " OR State_name= '" + newGeog&lt;I&gt; + "'";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; distFeatureLayer.setDefinitionExpression(strNewGeog);
&amp;nbsp;&amp;nbsp; distFeatureLayer.selectFeatures(query, esri.layers.FeatureLayer.SELECTION_NEW);
&amp;nbsp;&amp;nbsp; distFeatureLayer.setRenderer(renderer);
&amp;nbsp; }
&amp;nbsp; infoTemplate.setContent(resultContent);
 }); //another function shows and hides the relevant feature layer
}
dojo.addOnLoad(init);
&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please help me resolve this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Samir&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:45:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441611#M40805</guid>
      <dc:creator>SamirGambhir</dc:creator>
      <dc:date>2021-12-11T19:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Renderer issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441612#M40806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;How do I check if the renderer object has been created without applying it in this code? I suspect my code is not generating an object. Any suggestions?&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All the usual web debugging methods apply:&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;watch the request to generateDataClasses via your browser's dev tools and look at the response&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;console.log the response&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;use a breakpoint to inspect various variable values at runtime&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;BR /&gt;&lt;SPAN&gt;If you could post a complete but simplified version of your page so we can run and debug that would be helpful as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd also like to encourage you to upgrade to 3.2 even though our generate renderer sample does indeed work with 2.8.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2012 23:22:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441612#M40806</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-11-19T23:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Renderer issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441613#M40807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;All the usual web debugging methods apply:&amp;nbsp; &lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;watch the request to generateDataClasses via your browser's dev tools and look at the response&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;console.log the response&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;use a breakpoint to inspect various variable values at runtime&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;BR /&gt;If you could post a complete but simplified version of your page so we can run and debug that would be helpful as well.&lt;BR /&gt;&lt;BR /&gt;I'd also like to encourage you to upgrade to 3.2 even though our generate renderer sample does indeed work with 2.8.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Derek,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried all these steps and followed the messages on web console but found no credible leads. I will try to create a simplified version which can be tested.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Samir&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2012 23:52:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441613#M40807</guid>
      <dc:creator>SamirGambhir</dc:creator>
      <dc:date>2012-11-19T23:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Renderer issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441614#M40808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Derek,&lt;BR /&gt;I have tried all these steps and followed the messages on web console but found no credible leads. I will try to create a simplified version which can be tested.&lt;BR /&gt;Thanks&lt;BR /&gt;Samir&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Derek,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried resolving this issue by trying out different ways but failed. I have created a simplified version of this application and is attached. Can you please look at this? I have struggled quite a bit with this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Samir&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 15:08:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441614#M40808</guid>
      <dc:creator>SamirGambhir</dc:creator>
      <dc:date>2012-11-26T15:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Renderer issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441615#M40809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've attached a simpler version of your page that uses 3.2 and works with a layer from on of our public map service. As long as you're using a 10.1 server, you should be able to replace the URL, change the field name and you should be good to go. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please let me know if the attached code works with your map service.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 19:05:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441615#M40809</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-11-26T19:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Renderer issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441616#M40810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I've attached a simpler version of your page that uses 3.2 and works with a layer from on of our public map service. As long as you're using a 10.1 server, you should be able to replace the URL, change the field name and you should be good to go. &lt;BR /&gt;&lt;BR /&gt;Please let me know if the attached code works with your map service.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Derek,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This code works really well with 3.2, but fails with 2.8 even if I make the changes necessary to access relevant dojo files. I can consider moving to 3.2 JS but that adds a lot of other complications. I am not sure what is it that makes it work with 3.2 but not with 2.8, even though the sample on ESRI site is designed for 2.8. Can you please make this code work with 2.8?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Samir&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 17:20:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441616#M40810</guid>
      <dc:creator>SamirGambhir</dc:creator>
      <dc:date>2012-11-27T17:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Renderer issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441617#M40811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We don't usually modify or provide patches for older versions of our API. The later 2.x releases are when we started including new ArcGIS Server 10.1 functionality. We built those releases against beta releases of ArcGIS Server and occasionally had to work around issues in the 10.1 betas. Off the top of my head, I'm not certain we had workarounds in the generate renderer task but I suspect we did and that might be the reason this is failing. 3.0 coincided with the release of ArcGIS Server 10.1 final. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think the more productive route is to move to 3.x, preferably 3.2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What's stopping you from moving to 3.2? It is a different Dojo version, but I think most common migration issues are documented throughout this forum and we have a &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/migration_30.htm"&gt;migrating to 3.0 doc&lt;/A&gt;&lt;SPAN&gt; that outlines a few things to know about. If you post specific issues/errors you're seeing as new threads here we can help (after you search the forum of course ;)).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Nov 2012 18:21:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441617#M40811</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-11-27T18:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Renderer issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441618#M40812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;We don't usually modify or provide patches for older versions of our API. The later 2.x releases are when we started including new ArcGIS Server 10.1 functionality. We built those releases against beta releases of ArcGIS Server and occasionally had to work around issues in the 10.1 betas. Off the top of my head, I'm not certain we had workarounds in the generate renderer task but I suspect we did and that might be the reason this is failing. 3.0 coincided with the release of ArcGIS Server 10.1 final. &lt;BR /&gt;&lt;BR /&gt;I think the more productive route is to move to 3.x, preferably 3.2.&lt;BR /&gt;&lt;BR /&gt;What's stopping you from moving to 3.2? It is a different Dojo version, but I think most common migration issues are documented throughout this forum and we have a &lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/migration_30.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;migrating to 3.0 doc&lt;/A&gt; that outlines a few things to know about. If you post specific issues/errors you're seeing as new threads here we can help (after you search the forum of course ;)).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Derek,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I managed to modify my application to work with 3.2. Thanks for your help fixing the renderer issue. Now I am trying to set up the legend but it is not working. The code below shows the legend only when the "Map it" button is clicked twice. I added a global variable (legendDijit), added CSS code as below and added this small piece of code to your existing code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
CSS:
#legend {width: 150px; color: black;}

JS:
if (legendDijit) {
 legendDijit.destroyRecursive(true);
}
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
legendDijit = new esri.dijit.Legend({
 map : mapM,
 layerInfos : [{
&amp;nbsp; layer : stateFeatureLayer,
&amp;nbsp; title : "Title"
&amp;nbsp; }]
 }, "legend");
legendDijit.startup();
legendDijit.refresh();
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll appreciate it if you can look into it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Samir&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:45:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441618#M40812</guid>
      <dc:creator>SamirGambhir</dc:creator>
      <dc:date>2021-12-11T19:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Renderer issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441619#M40813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Derek,&lt;BR /&gt;I managed to modify my application to work with 3.2. Thanks for your help fixing the renderer issue.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Glad you were able to upgrade and that I was able to help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;Now I am trying to set up the legend but it is not working. The code below shows the legend only when the "Map it" button is clicked twice. I added a global variable (legendDijit), added CSS code as below and added this small piece of code to your existing code.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is a new, different issue. Please start a new thread.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When you do post a new thread, please include a complete code sample that reproduces the issue. Similar to how in one of my previous posts in this thread I took the generate renderer sample and modified it to match what you were attempting to do, please take one of our samples and try to reproduce the issue you're seeing.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2012 19:24:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-renderer-issue/m-p/441619#M40813</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-12-07T19:24:57Z</dc:date>
    </item>
  </channel>
</rss>

