Is there a way to add a title and a legend to the map that I want to print?
Sure. Instead of printing directly the map, you have to print a panel containing the map and any controls such as the legend control.There is a print sample here : http://www.arcgis.com/home/item.html?id=e361c2cc69784fcba34358d0458f66e3With this sample you can print the legend (e.g. print result with legend).
You mentioned in the webpage that ArcGISDynamicMapService layers don't print when the output size is greater than A2, which means that I cannot print our the A4 if I use the dynamic mapservice right?
Also, I have a question related to the codes. I cannot add this line to my codes...using ESRI.ArcGIS.Client.Samples.MapPrinting;
and same with these three namespaces. xmlns:userControls="clr-namespace:MapPrinting.UserControls"xmlns:controls="clr-namespace:ESRI.ArcGIS.Client.Samples.MapPrinting;a ssembly=MapPrintingControls"xmlns:actions="clr-namespace:MapPrinting.Actions"
You have to build the MapPrintingControls project and, in your project, you have to add a reference to MapPrintingControls.dll.
Can I just copy the MapPrintingControls folder to my project folder and add the MapPrintingControls project into my project?
Yes, you can. In this case, in the add reference dialog box, you have to use the 'Projects' option.
<userControls:WindowPanel x:Name="PrintDialogPanel" ContentTitle="PDF Printing" Collapsible="False" Closable="True" Minimized="False" Visibility="Collapsed"> <controls:MapPrinterDialog Height="410" Width="340"> <controls:MapPrinter x:Name="mapPrinter" Map="{Binding ElementName=MyMap}" Style="{StaticResource WithLegend}"/> </controls:MapPrinterDialog> </userControls:WindowPanel>
<mapControl:WindowPanel x:Name="MapPrinterDialogPanel" Width="340" Height="405" IsOpen="True" Visibility ="Collapsed" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,60,10,0"> <Printcontrols:MapPrinterDialog x:Name="MapPrinterDialog" Background="{StaticResource CommonBackgroundBrush}" Grid.Row="1"> <Printcontrols:MapPrinter x:Name="mapPrinterWithDialog" Map="{Binding ElementName=MyMap}" Title="�?��?�" PageChanged="mapPrinter_PageChanged" IsScaleFixed="True" Scale="2000000" /> </Printcontrols:MapPrinterDialog> <mapControl:WindowPanel.ContentTitle > <StackPanel Orientation="Horizontal" Height="20"> <Image x:Name="prtDlgTitle" Stretch="Fill" Width="20" Height="20" Margin="5,0" /> <TextBlock Foreground="White" FontSize="12" Text="print" TextWrapping="NoWrap" VerticalAlignment="Center" /> </StackPanel> </mapControl:WindowPanel.ContentTitle> </mapControl:WindowPanel>
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.