Currently using the print gadget but some layers cannot be printed, so how can I control the layers during printing?
const print = new Print({
view: view,
printServiceUrl: ArcGIS_Url.PrintingToolsUrl,
container: "panelPrintWidget",
});
Hi @Wade, thanks for posting your question here. Can you describe a bit more about the issue you are encountering, or what you are trying to accomplish with the Print widget?
Hi @Noah-Sager
I have feature layers and wmts in my map, but when I print the tool I get an error. It seems that wmts cannot be used for printing?
So I would like to ask if I can control the wmts part not to be printed when using print.
Hmm, printing WMTS should be fine. I can print them from this sample: https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=layers-wmts
Can you share the error message? It would be helpful to see the JSON that is sent to the print service as well. You can send me info in a private message if that's better for you.
hi @Noah-Sager , When I use the print tool, an error message returns extendedCode: -2147467259
message: "Unable to complete operation.".
@Wade - there should be a more specific message. Can you expand the error and look for "details"?
hi @Noah-Sager
When I print again, the layers I use are in different domains, and some require the use of proxy. Is there something wrong with the settings?
Some proxy services require an account and password to log in. There is no problem when connecting layers. However, as long as you use the printing tool, you will get this error.
error message returns extendedCode: -2147467259
message: "Unable to complete operation.".