|
POST
|
I posted the code of the sample here : http://www.arcgis.com/home/item.html?id=1e432da7e74f4402bd43a5863167022d
... View more
03-01-2011
12:51 AM
|
0
|
0
|
480
|
|
POST
|
There is a print sample here : http://www.arcgis.com/home/item.html...4358d0458f66e3 With this sample you can print title and legend (e.g. print result with legend).
... View more
02-27-2011
11:03 PM
|
0
|
0
|
2880
|
|
POST
|
Hi Samuel, Your attributes contain UIElements that we try to reuse in the printmap. That's likely your issue since an UIElement can't be reused. The print sample doesn't clone the attributes but you can extent it to clone the UIElements included in the attributes. The actual cloning code is this one: private static Layer CloneLayer(Layer layer)
{
.......
var graphicCollection = new GraphicCollection();
foreach (var graphic in fromLayer.Graphics)
{
var clone = new Graphic();
foreach (var kvp in graphic.Attributes)
{
clone.Attributes.Add(kvp);
}
........... This one should clone the UIElements: private static Layer CloneLayer(Layer layer)
{
.......
var graphicCollection = new GraphicCollection();
foreach (var graphic in fromLayer.Graphics)
{
var clone = new Graphic();
foreach (var kvp in graphic.Attributes)
{
if (kvp.Value is DependencyObject)
{
// If the attribute is a dependency object --> clone it
var clonedkvp = new KeyValuePair<string, object>(kvp.Key, (kvp.Value as DependencyObject).Clone());
clone.Attributes.Add(clonedkvp);
}
else
clone.Attributes.Add(kvp);
}........ Hope this help.
... View more
02-27-2011
10:59 PM
|
0
|
0
|
1705
|
|
POST
|
Hi Nathalie, At first glance, I don't see why your button would not collapse the dialog panel. Just a reminder : the button and the panel have to be in the same xaml file. is it your case?
... View more
02-27-2011
10:42 PM
|
0
|
0
|
1705
|
|
POST
|
A reminder just in case... : for private services, the legend control needs ArcGIS server 10SP1 and can't work with previous versions.
... View more
02-25-2011
05:40 AM
|
0
|
0
|
1960
|
|
POST
|
Yes, it did work. ............. and on the successive recursive calls the items are null. I can't understand how the legend control could work well (i.e. the control displays the legend items with label+image) and at the same time, by code, the LegendItems are always null (i.e. looks like no swatches are returned by the legend service). Is your map service public or private? (If public and if you want, send me your code [email protected], I will take a look.)
... View more
02-25-2011
04:42 AM
|
0
|
0
|
1960
|
|
POST
|
For the moment, the feature layers doesn't support labelling out of the box. For workarounds ideas, we can refer to these threads: http://forums.arcgis.com/threads/12684-How-can-I-label-features-rendered-in-a-feature-layer http://forums.arcgis.com/threads/10273-autolabels-not-appearing-in-flexview
... View more
02-25-2011
12:16 AM
|
0
|
0
|
595
|
|
POST
|
the data used in featureservice is getting deleted from the SDE Feature Dataset. This is driving me crazy. Do you mean that the data are definitively lost on the server side? (I can understand you get crazy!)
... View more
02-25-2011
12:08 AM
|
0
|
0
|
1715
|
|
POST
|
it did not apply to a button...just a togglebutton I think. Right, 'IsChecked' applies for ToggleButton only. If you are not a MVVM "purist" in terms of following "no code behind for the View" guideline, I would just toggle the IsActive property by code when the user clicks on your print button (at the same that you toggle the preview visibility).... otherwise it is probably possible to use binding/actions/... without code but I would need more infos about the container you are using.
... View more
02-25-2011
12:03 AM
|
0
|
0
|
1705
|
|
POST
|
Is a basic legend control (without any code, templating,..) working well with your service? If answer is no, we have first to solve this issue (standard question in this case : which arcgis server version? is your service public or private?) If answer is yes, it means that the imagesource is well initialized by the service. Then, the issue might come from the C# code I provided to initialize the imagesource of the layeritems. Try to set a breakpoint on this line: layerItem.ImageSource = layerItem.LegendItems.First().ImageSource; // set the image of the sublayer with the image of the first legenditem and look at the imagesource initialized at this point.
... View more
02-24-2011
02:36 PM
|
0
|
0
|
1960
|
|
POST
|
Did you try with a popup? As far as I remember, I think there is no limitation to the screen size with a popup. And for sure the sample I pointed out is working when printing (with or without preview) to a printer bigger than the screen (A2, A1, A0).
... View more
02-24-2011
02:29 PM
|
0
|
0
|
1722
|
|
POST
|
The only problem I'm having is my printing dialog isn't refreshing when my map extent changes The print sample doesn't wire up the map extent changes. The print extent is defined when 'IsActive' is set to true and then is frozen (except by the 'ChangePrintextent' command inside the preview window). In the sample, the print extent is defined when the windowpanel is being opened. This is done by this binding : IsActive="{Binding ElementName=btnToggleMapPrinterDialogPanel, Path=IsChecked }" i.e. when the print button is checked, the map printer captures the current extent and the current layers. Additionaly IsOpen="{Binding ElementName=btnToggleMapPrinterDialogPanel, Path=IsChecked, Mode=TwoWay}" binds the visibility of the window panel to the same button.
... View more
02-24-2011
02:24 PM
|
0
|
0
|
1705
|
|
POST
|
After further verifications, it looks like the arcgis.com legend service doesn't support secure services. But this should work with arcgis server from version 10SP1 (because in this case the arcgis.com fallback mechanism is no longer used). Is there any chance you can upgrade your server?
... View more
02-24-2011
02:14 PM
|
0
|
0
|
2067
|
|
POST
|
One option is you to create a popup (with an opacity set to 0.0 if you want it hidden), and put your printerView (or your main control containing the map) inside this popup.
... View more
02-24-2011
08:43 AM
|
0
|
0
|
1722
|
|
POST
|
The overview map contain one layer of any type. So a graphic layer is a possible option (as long as there is only one graphic layer).
... View more
02-24-2011
08:36 AM
|
0
|
0
|
557
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-12-2025 03:01 AM | |
| 1 | 10-14-2025 09:24 AM | |
| 1 | 06-13-2013 09:22 AM | |
| 1 | 04-29-2022 02:21 AM | |
| 1 | 04-29-2022 02:28 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-30-2025
08:06 AM
|