AnsweredAssumed Answered

Printing with Legend

Question asked by mhoover12 on Nov 30, 2012
Latest reply on Nov 17, 2015 by TikiLeBrock
Can someone post a sample or at least a chunk of code on how to use 10.1's Web Printing capabilities with a legend?  The Print Service works for me, even when publishing my own, but the legend seems to be ignored.  I have a legend in my map document and have tried the following bit of code, per the API reference, with no luck:

 var legendLayer = new esri.tasks.LegendLayer();         legendLayer.layerId = '_cADMLocations';         legendLayer.subLayerIds = [0];         template.layoutOptions = {             titleText: 'My First Map',             authorText: 'Mark Hoover',             scalebarUnit: 'Miles',             legendLayers: [legendLayer]         };

Outcomes