Hi
I'm facing an issue when trying to modify the legend, which is created by Print-Widget + ExportWebMap GPTool.
I can turn legend entries (property legendEnabled) on and off for FeatureLayer, WMSLayer, WMSSublayer and for a whole MapImagelayer. But the property legendEnabled in sublayer seems to be ignored by Print Widget, when building the ExportWebMap json.
I've made a pen for this issue. Unfortunately the AGOL PrintService is blocked by codepen, but you can see the WebMapJSON payload in DevTools' Network tab.
[...]
"legendOptions":{"operationalLayers":[{"id":"18f6154546c-layer-0","subLayerIds":[3,2,1,0]}]}}}
As you can see all sublayers are included, though I turned one off in the sample.
Here's the link to the pen: https://codepen.io/gdi-hokis/pen/VwOZVJm
Any help is appreciated
gdi-hohenlohekreis.de