AnsweredAssumed Answered

Problem with GenerateRendererTask() and setLayerDefinitions()  10.4

Question asked by emyers_USGS on May 12, 2017
Latest reply on May 18, 2017 by emyers_USGS

Hi There,

I'm using the JS API v.3.20 GenerateRendererTask() and ClassBreaksDefinition() to render classes and allow the user to customize the map data.  It works fine for the entire layer, but as soon as I set layer definitions the map does not export properly.  The renderer appears to be working because the classes are set correctly in the legend with the correct symbols applied.  The strange thing is that if I change to a simpleRenderer, I can render a custom symbol on the map and in the legend.  I need it to work with class breaks though.

 

I've been struggling with this for some time now.  Here is a link to a js fiddle from a customized esri sample.  Uncomment the block at line 103 to see how setting layerDefinitions breaks the map output.   Edit fiddle - JSFiddle 

 

I also attached the html file.  Can anyone explain why the full layer renders properly, but a subset of the layer does not?  Myself and entire team have tried multiple variations and are stumped!

 

Thanks!

Outcomes