API 3.0 PrintTask with RenderTask

679
1
05-09-2012 06:53 AM
olivierdev
New Contributor III
Does the new ArcGIS for Silverlight API 3.0 support generateRendererTask result (DynamicLayer) in a print output that was created with a PrintTask ?
Pre release API doesn't seem to support that : the params sent to the server only specify the basemap layer (TileLayer) and / or dynamicLayer in operational layer param but if the dynamicLayer was rendered with a renderTask, it will skip it in the print request.
Is that correct?
Do I miss something?

Thanks,

olivier
0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
Thank you for reporting this. I was able to reproduce with the following SDK sample: http://resourcesbeta.arcgis.com/en/help/silverlight-api/samples/start.htm#GenerateRenderer

I simply added these lines:
XAML
 <Button Content="Prints" Click="Button_Click"  Width="140" Height="30" 
                    VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5"/>

Code-Behind
  private void Button_Click(object sender, RoutedEventArgs e)
  {
   var printTask = new PrintTask("http://yourservername:6080/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task");
   printTask.ExecuteCompleted+=new EventHandler<PrintEventArgs>(printTask_ExecuteCompleted);
   printTask.ExecuteAsync(new PrintParameters(MyMap));
  }


We will try to get this fixed before final.

Meanwhile, if you replace the layer in XAML with the following code. It should work:
  
<esri:ArcGISDynamicMapServiceLayer ID="USA"    
    Url="http://servicesbeta2.esri.com/arcgis/rest/services/Census/MapServer">    
    <esri:ArcGISDynamicMapServiceLayer.DynamicLayerInfos>
     <esri:DynamicLayerInfoCollection>
     <esri:DynamicLayerInfo ID="2">
      <esri:DynamicLayerInfo.Source>
       <esri:LayerMapSource MapLayerID="2" />
      </esri:DynamicLayerInfo.Source>
     </esri:DynamicLayerInfo>
     </esri:DynamicLayerInfoCollection>
    </esri:ArcGISDynamicMapServiceLayer.DynamicLayerInfos>
   </esri:ArcGISDynamicMapServiceLayer>
0 Kudos