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] };