Hi,
has anyone encountered issue with the Print widget where the layer legend shows in the legend widget, but it did not show when using print widget to print.
I'm having issue with the print widget, where it prints all the legends that shows in the legend widget except for one layer. what would be the potential cause for this? Thanks!!
Thanks,
Ryan
What kind of layer is it?
Can you provide screenshots of the legend widget as well as how it looks through the print widget?
Hi Michael,
left is from legend widget and right is from the pdf, and the data show up in the map without any issue and no error returned when retrieving the layer.
Thanks,
Ryan
Hi John,
it's dynamic layer. "ArcGISDynamicMapServiceLayer". but somehow only this layer is behaving this way, I republished it few times but still doing the same thing.
Thanks,
Ryan
Is this your own org's custom print service?
Are all the services from your org or do you bring in external services?
All the services are from within my org, no external services. The print service is the out-of-the-box one that comes with the server and portal, should be the default setting.
Somehow it works when I use on load to addLayer, instead of addLayer directly. No idea why do I need to do that.
var randomStuffDynamicTemplate = {};
randomStuffDynamicTemplate[0] = { infoTemplate: randomStuffTemplate };
var randomStuffDynamicLayer = new ArcGISDynamicMapServiceLayer(randomStuffDynUrl,
{id: "randomStuffDynamicLayer", name: "randomStuff Location", outFields: ["*"] , minScale: randomStuffLocMinVal, imageformat: "png32"});
randomStuffDynamicLayer.setVisibleLayers([0]);
randomStuffDynamicLayer.setInfoTemplates(randomStuffDynamicTemplate);
var randomStuffLayerDefinitions = [];
randomStuffLayerDefinitions[0] = randomStuff_ID;
var randomStuffLayerDrawingOptions= [];
var randomStuffLayerDrawingOption = new LayerDrawingOptions();
randomStuffLayerDrawingOption.renderer=randomStuffRenderer;
randomStuffLayerDrawingOptions[0] = randomStuffLayerDrawingOption;
randomStuffDynamicLayer.setLayerDrawingOptions(randomStuffLayerDrawingOptions);
randomStuffDynamicLayer.setLayerDefinitions(randomStuffLayerDefinitions);
randomStuffDynamicLayer.on("load", lang.hitch(this,addMapThatLayer));
function addMapThatLayer(){
this.map.addLayer(randomStuffDynamicLayer);
};