Well, I can reproduce the problem in my application using public data. Pointing to the "http://servicesbeta2.esri.com/arcgis/rest/services/Census/MapServer" mapping service, I can see in my application that after the GenerateRendererTask callback function included previously is complete the legend is using the default symbology defined in the mapping service for the layer and that it continues to show the same after zooming in one level.[ATTACH=CONFIG]17941[/ATTACH][ATTACH=CONFIG]17942[/ATTACH]I'll try to pull apart the pieces of my app to create something that actually resembles what I am doing and illustrates the problem but I'm not certain I'll be able to as it's somewhat complicated.One additional piece of info that might be indicative of something... the legend.refresh() calls aren't actually considering anything as having changed with respect to the dynamic layer after the different symbology is applied. It doesn't seem to be registering that the display is different because it is not actually requesting an updated legend display from the server. When I watch the traffic with Fiddler (that is, the URL requests and responses), after the generateRenderer request, there are no calls to get the legend for that layer. Whereas, in the "http://help.arcgis.com/en/webapi/javascript/arcgis/demos/renderer/renderer_dynamic_layer_change_attr..." sample, after the generateRenderer request is made, a legend request is also sent to update the legend's display as you can see in these two requests (from the sample page, that is):
http://servicesbeta2.esri.com/arcgis/rest/services/Census/MapServer/2/generateRenderer?classificationDef={"baseSymbol":{"color":null,"type":"esriSFS","style":"esriSFSSolid"},"colorRamp":{"type":"algorithmic","algorithm":"esriHSVAlgorithm","fromColor":[255,255,204,255],"toColor":[0,104,55,255]},"type":"classBreaksDef","classificationField":"WHITE","classificationMethod":"esriClassifyNaturalBreaks","breakCount":5}&f=json
http://servicesbeta2.esri.com/arcgis/rest/services/Census/MapServer/legend?f=json&dynamicLayers=[{"id":2,"source":{"type":"mapLayer","mapLayerId":2},"drawingInfo":{"renderer":{"type":"classBreaks","field":"WHITE","minValue":-99,"classBreakInfos":[{"classMaxValue":84181,"label":"-99 - 84181","description":"","symbol":{"color":[255,255,204,255],"type":"esriSFS","style":"esriSFSSolid"}},{"classMaxValue":294324,"label":"84182 - 294324","description":"","symbol":{"color":[184,217,130,255],"type":"esriSFS","style":"esriSFSSolid"}},{"classMaxValue":759924,"label":"294325 - 759924","description":"","symbol":{"color":[96,179,71,255],"type":"esriSFS","style":"esriSFSSolid"}},{"classMaxValue":1997123,"label":"759925 - 1997123","description":"","symbol":{"color":[28,140,45,255],"type":"esriSFS","style":"esriSFSSolid"}},{"classMaxValue":4637062,"label":"1997124 - 4637062","description":"","symbol":{"color":[0,105,56,255],"type":"esriSFS","style":"esriSFSSolid"}}]}}}]
In my application, only the first request is made, the second never is. So, it always just displays the legend definition that it had when the esri.digit.Legend was instantiated and its startup called. Whatever exists in the map at that time, with respect to these dynamic layers is what will always be displayed for that layer's portion of the legend even after a refresh is called. For example, if I have already rendered the map with a classified dynamic layer, say with 5 classes, and then instantiate the legend digit, the legend will correctly show the classification. If I then change the number of classes I want to use (say to 10) and redisplay the map with the new renderer definition, the map is updated with the generaterenderer request, but no legend request is made and the legend redisplays the original 5-class scheme it created for that layer at the startup of the digit.Does that suggest anything in particular that isn't being done as it should? cheers,jtm