<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic PrintTask/PrintParameters bug? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/printtask-printparameters-bug/m-p/743694#M68784</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a site with two cached map services and one dynamic service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I add my dynamic layer to my map, I call .setVisibleLayers([ ... ]) to set my desired layers. One of the layers is a group layer, the others are in the "root" level. I pass the "group" level id to .setVisibleLayers([ ... ]) for the group layer as I want all layers in that group visible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've created a "print" function which is called from a button onclick which executes a simple PrintTask.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
function printMap() {
 require(["esri/tasks/PrintTask", "esri/tasks/PrintParameters", "esri/tasks/PrintTemplate"], 
&amp;nbsp;&amp;nbsp; function(PrintTask, PrintParameters, PrintTemplate){
&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var url = "http://gisapps/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export Web Map Task";
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var template = new PrintTemplate();
&amp;nbsp;&amp;nbsp;&amp;nbsp; template.layoutOptions = {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; titleText: "Selected Work",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; legendLayers: []
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; };
&amp;nbsp;&amp;nbsp;&amp;nbsp; template.format = "PDF";
&amp;nbsp;&amp;nbsp;&amp;nbsp; template.layout = "A4 Landscape";
&amp;nbsp;&amp;nbsp;&amp;nbsp; template.exportOptions = {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; width: 1024,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; height: 786,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dpi: 96
&amp;nbsp;&amp;nbsp;&amp;nbsp; };


&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var params = new PrintParameters();
&amp;nbsp;&amp;nbsp;&amp;nbsp; params.template = template;
&amp;nbsp;&amp;nbsp;&amp;nbsp; params.map = map;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var printTask = new PrintTask(url);
&amp;nbsp;&amp;nbsp;&amp;nbsp; printTask.execute(params, function(results){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.open(results.url);
&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp; }
 );
}
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I execute this PrintTask, the grouped layers in my dynamic service do not appear in the output - the other layers do. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If instead of supplying the group layer id to .setVisibleLayers[ ... ]) I supply the individual layer ids, they then appear in the PrintTask output.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm fairly sure this is a bug, because it would seem a bit strange that supplying the group layer id to .setVisibleLayers() would result in all layers in the group becoming visible in the map, but not the output of the PrintTask.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Apr 2014 04:08:27 GMT</pubDate>
    <dc:creator>TimCollyer</dc:creator>
    <dc:date>2014-04-08T04:08:27Z</dc:date>
    <item>
      <title>PrintTask/PrintParameters bug?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/printtask-printparameters-bug/m-p/743694#M68784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a site with two cached map services and one dynamic service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I add my dynamic layer to my map, I call .setVisibleLayers([ ... ]) to set my desired layers. One of the layers is a group layer, the others are in the "root" level. I pass the "group" level id to .setVisibleLayers([ ... ]) for the group layer as I want all layers in that group visible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've created a "print" function which is called from a button onclick which executes a simple PrintTask.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
function printMap() {
 require(["esri/tasks/PrintTask", "esri/tasks/PrintParameters", "esri/tasks/PrintTemplate"], 
&amp;nbsp;&amp;nbsp; function(PrintTask, PrintParameters, PrintTemplate){
&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var url = "http://gisapps/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export Web Map Task";
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var template = new PrintTemplate();
&amp;nbsp;&amp;nbsp;&amp;nbsp; template.layoutOptions = {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; titleText: "Selected Work",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; legendLayers: []
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; };
&amp;nbsp;&amp;nbsp;&amp;nbsp; template.format = "PDF";
&amp;nbsp;&amp;nbsp;&amp;nbsp; template.layout = "A4 Landscape";
&amp;nbsp;&amp;nbsp;&amp;nbsp; template.exportOptions = {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; width: 1024,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; height: 786,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dpi: 96
&amp;nbsp;&amp;nbsp;&amp;nbsp; };


&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var params = new PrintParameters();
&amp;nbsp;&amp;nbsp;&amp;nbsp; params.template = template;
&amp;nbsp;&amp;nbsp;&amp;nbsp; params.map = map;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var printTask = new PrintTask(url);
&amp;nbsp;&amp;nbsp;&amp;nbsp; printTask.execute(params, function(results){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.open(results.url);
&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp; }
 );
}
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I execute this PrintTask, the grouped layers in my dynamic service do not appear in the output - the other layers do. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If instead of supplying the group layer id to .setVisibleLayers[ ... ]) I supply the individual layer ids, they then appear in the PrintTask output.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm fairly sure this is a bug, because it would seem a bit strange that supplying the group layer id to .setVisibleLayers() would result in all layers in the group becoming visible in the map, but not the output of the PrintTask.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2014 04:08:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/printtask-printparameters-bug/m-p/743694#M68784</guid>
      <dc:creator>TimCollyer</dc:creator>
      <dc:date>2014-04-08T04:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: PrintTask/PrintParameters bug?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/printtask-printparameters-bug/m-p/743695#M68785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you ever get a solution to this? I am facing the same problem. This feels very much like a bug to me also.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 01:34:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/printtask-printparameters-bug/m-p/743695#M68785</guid>
      <dc:creator>AndrewThomas2</dc:creator>
      <dc:date>2014-10-22T01:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: PrintTask/PrintParameters bug?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/printtask-printparameters-bug/m-p/743696#M68786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have got similar problems using Argis Runtime SDK for .NET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using &lt;STRONG&gt;SetFeatureVisibility(listofids, false)&lt;/STRONG&gt; inside a Layer and calling PrintTask the Features &lt;STRONG&gt;don't disappear&lt;/STRONG&gt; inside the (pdf, gif etc.) document.&lt;/P&gt;&lt;P&gt;I also tried using DefinitionExpression which has the same effect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The features disappear on the MapView.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks like a bug to me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Oct 2014 10:39:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/printtask-printparameters-bug/m-p/743696#M68786</guid>
      <dc:creator>PetteriFischer</dc:creator>
      <dc:date>2014-10-23T10:39:08Z</dc:date>
    </item>
  </channel>
</rss>

