On the Print Webmap sample (Print webmap | ArcGIS API for JavaScript ) there is this code and comment...
legendLayers: [], // empty array means no legend
What is supposed to be passed into here? The legend dijit has layers and layerInfos. I have tried both but I am not seeing any legend or symbology on the output.
According to this page, you want to use the layerId for the layers you want to add: PrintTemplate | API Reference | ArcGIS API for JavaScript
Hi James,
I think you need to pass it a LegendLayer (notice no "s" on the end) object.
This is probably the best discussion of how it works that I've been able to find.
Also, note that if you delete that line you'll get a legend in your printed map.
Jarrod