Can anyone please show how to get a legend layers from multiple services into the print template? It appears I can only pick one set of items, but which service do those items come from?
Thanks.
Hi there!
I don't know if you still search an Answer for this Problem, but here's what i hav done to insert two Legends from differnet Layers.
It's pretty simple
app.LegendForTemplate = new LegendLayer();
app.LegendForTemplate.layerId = "yourLayerIDhere";
app.LegendForTemplate.subLayerIds = [0,2];
and for the second Layer
app.LegendForTemplate2 = new LegendLayer();
app.LegendForTemplate2.layerId = "YourLayerID";
app.LegendForTemplate2.subLayerIds = [1,2,3];
In your Printtemplate you have to declare this two together like:
var template = new PrintTemplate();
template.layoutOptions = {
//legendLayers: [], // empty array means no legend
legendLayers: [app.LegendForTemplate,app.LegendForTemplate2],
...
Regards, Miriam
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.