Dynamic Layers / Export Web Map / Legend

Discussion created by ajjacobson on Sep 10, 2012
Latest reply on Nov 22, 2012 by groundworklondon
I have a javascript application where I am utilizing dynamicLayers to manipulate a demographic layer in order to dynamically generate a class breaks render based off of the current map extent. Everything works great. I even have a legend dijit that automatically updates the classes every time the exent is changed.

I setup an ExportWebMap geoprocessing task with a custom layout to display a legend on the output image. This geoprocess task also works great, producing a high-quality image of the dynically generated class breaks as well as a legend.

The problem is the legend is not displaying the dynamically generated classes. It appears to be displaying the default classes returned from myservice/MapServer/Legend.

I know that the legend endpoint supports dynmicLayers as I am using it elsewhere and otherwise my legend dijit would not work. Is it possible that the ExportWebMap geoprocessing task does not support dynamicLayers on a legend in the layout?

Any insight would be appreciated.