function printMap() {
require(["esri/tasks/PrintTask", "esri/tasks/PrintParameters", "esri/tasks/PrintTemplate"],
function(PrintTask, PrintParameters, PrintTemplate){
var url = "http://gisapps/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export Web Map Task";
var template = new PrintTemplate();
template.layoutOptions = {
titleText: "Selected Work",
legendLayers: []
};
template.format = "PDF";
template.layout = "A4 Landscape";
template.exportOptions = {
width: 1024,
height: 786,
dpi: 96
};
var params = new PrintParameters();
params.template = template;
params.map = map;
var printTask = new PrintTask(url);
printTask.execute(params, function(results){
window.open(results.url);
});
}
);
}
Hi Tim.
Did you ever get a solution to this? I am facing the same problem. This feels very much like a bug to me also.
I have got similar problems using Argis Runtime SDK for .NET.
When using SetFeatureVisibility(listofids, false) inside a Layer and calling PrintTask the Features don't disappear inside the (pdf, gif etc.) document.
I also tried using DefinitionExpression which has the same effect.
The features disappear on the MapView.
Looks like a bug to me.