<?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 FeatureLayer not included in print using PrintParameters(layers, extent) constructor in ArcGIS Runtime SDK for WPF (Retired) Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-not-included-in-print-using/m-p/303445#M1496</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to get printing working from a viewmodel and when I construct the PrintParameters I'm using the public PrintParameters(IEnumerable&amp;lt;Layer&amp;gt; layers, Envelope mapExtent) constructor as I don't have a reference to the map control. This works for all layers except feature layers. I'm creating the layers from a model class so I'm not cloning the layers. The problem is that it does not get serialized and sent as part of the request to export web map in the operational layers. It looks like its due to the SDK checking if the layer has any graphics (ToJson() method of PrintParameters) which it doesn't since the layer is not initialized though I have set the url, token and where clause. I can see why it doesn't work but in this scenario I would think its valid to still expect the print to include the feature layer and do a server side call to the service rather than trying to send the client state of the layer. This is with the 10.2 release of the SDK. Thoughts?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Nov 2013 22:55:31 GMT</pubDate>
    <dc:creator>DaveTimmins</dc:creator>
    <dc:date>2013-11-11T22:55:31Z</dc:date>
    <item>
      <title>FeatureLayer not included in print using PrintParameters(layers, extent) constructor</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-not-included-in-print-using/m-p/303445#M1496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to get printing working from a viewmodel and when I construct the PrintParameters I'm using the public PrintParameters(IEnumerable&amp;lt;Layer&amp;gt; layers, Envelope mapExtent) constructor as I don't have a reference to the map control. This works for all layers except feature layers. I'm creating the layers from a model class so I'm not cloning the layers. The problem is that it does not get serialized and sent as part of the request to export web map in the operational layers. It looks like its due to the SDK checking if the layer has any graphics (ToJson() method of PrintParameters) which it doesn't since the layer is not initialized though I have set the url, token and where clause. I can see why it doesn't work but in this scenario I would think its valid to still expect the print to include the feature layer and do a server side call to the service rather than trying to send the client state of the layer. This is with the 10.2 release of the SDK. Thoughts?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Nov 2013 22:55:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-not-included-in-print-using/m-p/303445#M1496</guid>
      <dc:creator>DaveTimmins</dc:creator>
      <dc:date>2013-11-11T22:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer not included in print using PrintParameters(layers, extent) construc</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-not-included-in-print-using/m-p/303446#M1497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for submitting this bug report. As part of optimizing the serialization of layers for printing, GraphicsLayer without Graphics are ignored. But we should include a check that the GraphicsLayer is not a FeatureLayer for this may also mean that the layer is simply not initialized (as in your case).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For the meantime, as a workaround you can add a temporary graphic to a FeatureLayer that is not yet initialized before you execute print.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
if(!layer.IsInitialized) // Note that if FeatureLayer is already initialized, this may cause an edit.
&amp;nbsp;&amp;nbsp; layer.Graphics.Add(new Graphic()); // this graphic will be cleared after FeatureLayer.UpdateCompleted is raised.
mapLayers.Add(layer);
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do the workaround above before executing a print. In code below, t is PrintTask, r is the PrintResult. &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var r = await t.ExecuteTaskAsync(new PrintParameters(mapLayers, mapExtent)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ExportOptions = new ExportOptions()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OutputSize = new Size(200, 200)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We'll try to get this fixed in future releases of the API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jennifer&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:32:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-not-included-in-print-using/m-p/303446#M1497</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-11T14:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer not included in print using PrintParameters(layers, extent) construc</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-not-included-in-print-using/m-p/303447#M1498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jennifer,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;yea I'd already done that as a workaround but thanks for confirming the bug.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Nov 2013 19:07:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-not-included-in-print-using/m-p/303447#M1498</guid>
      <dc:creator>DaveTimmins</dc:creator>
      <dc:date>2013-11-14T19:07:46Z</dc:date>
    </item>
  </channel>
</rss>

