|
POST
|
I forgot to add the exception: System.Runtime.InteropServices.COMException occurred HResult=-2003304445 Message=Exception from HRESULT: 0x88980003 Source=PresentationCore ErrorCode=-2003304445 StackTrace: at System.Windows.Media.Imaging.RenderTargetBitmap.FinalizeCreation() InnerException:
... View more
06-24-2014
11:37 AM
|
0
|
0
|
1730
|
|
POST
|
DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far??? I developed an application that creates a GraphicLayer and draw in it 827 graphics (polylines) using the ArcGIS runtime 10.2.2, each object has it own symbology defined using the following code to create the renderer:
private UniqueValueRenderer GetUniqueValueRenderer(GraphicsLayer layer, string attributeField)
{
var uniqueValueRenderer = new UniqueValueRenderer();
var defaultSymbol = new ESRI.ArcGIS.Client.Symbols.SimpleLineSymbol { Width = 2.5 };
uniqueValueRenderer.Field = attributeField;
var colorRange = new ColorRange { From = this.GetRandomColor(), To = this.GetRandomColor() };
var rampInterpolator = new RampInterpolator { ColorRange = colorRange };
foreach (var graphic in layer.Graphics)
{
var valueInfo = new UniqueValueInfo
{
Label = graphic.Attributes[attributeField].ToString(),
Value = graphic.Attributes[attributeField].ToString(),
Symbol =
rampInterpolator.GetInterpolatedSymbol(
defaultSymbol,
graphic,
0,
layer.Graphics.Count,
layer.Graphics.IndexOf(graphic))
};
uniqueValueRenderer.Infos.Add(valueInfo);
}
return uniqueValueRenderer;
}
In a workflow, I added the layer, remove it from the list of layers and then added again. In the last step of this workflow, the application launch the following exception: Exception from HRESULT: 0x88980003 in the PresentationCore.dll with the following callstack:
PresentationCore.dll!System.Windows.Media.Imaging.RenderTargetBitmap.FinalizeCreation() + 0xd8 bytes
PresentationCore.dll!System.Windows.Media.Imaging.RenderTargetBitmap.RenderTargetBitmap(int pixelWidth, int pixelHeight, double dpiX, double dpiY, System.Windows.Media.PixelFormat pixelFormat) + 0x169 bytes
ESRI.ArcGIS.Client.dll!ESRI.ArcGIS.Client.LegendSymbol.CreateImageSnapshot() + 0x2c8 bytes
ESRI.ArcGIS.Client.dll!ESRI.ArcGIS.Client.LegendSymbol.ToImageSource.AnonymousMethod__1() + 0x2b bytes
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) + 0x128 bytes
WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler) + 0x47 bytes
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl() + 0x281 bytes
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) + 0x285 bytes
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) + 0x9 bytes
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x57 bytes
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke() + 0x71 bytes
WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue() + 0x2a1 bytes
WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0xb3 bytes
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0x14a bytes
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) + 0x80 bytes
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) + 0x5a bytes
WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler) + 0x47 bytes
WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) + 0x2bc bytes
WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) + 0x140 bytes
[Native to Managed Transition]
[Managed to Native Transition]
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame) + 0x112 bytes
PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window) + 0x17a bytes
PresentationFramework.dll!System.Windows.Application.Run() + 0x67 bytes
Rosen.Clients.Infrastructure.IntegrityManagement.exe!Rosen.Clients.Infrastructure.IntegrityManagement.App.Main() + 0x77 bytes C#
If i set a SimpleRenderer for the layer, it does not show any issue. Reading the call stack and watching the behavior of the application, the symbols on the map are drawn but the application crash whe it tries to create the symbology for the legend control. so far i have been trying to release memory when the layer is removed:
public void RemoveLayer()
{
var layerItemViewModels = this.SelectedLayers;
if (layerItemViewModels != null)
{
var layerItemViewModel = layerItemViewModels.FirstOrDefault();
if (layerItemViewModel != null)
{
var selectedLayer = layerItemViewModel.Layer.DisplayName;
var layerToRemove = layerItemViewModel.Layer;
if (this.VisibleLayers.Contains(layerToRemove) && !(layerToRemove is ArcGISLocalTiledLayer || layerToRemove is ArcGISTiledMapServiceLayer))
{
var group = layerToRemove as GroupLayer;
if (group != null)
{
var layerIdList = group.GetLayerIdListFromGroup();
foreach (var layerId in layerIdList)
{
this.VisibleLayers.RemoveLayer(layerId);
}
}
else
{
this.VisibleLayers.RemoveLayer(layerToRemove.ID);
}
this.VisibleLayers.Remove(layerToRemove); // aqui se remueve el layer
if (layerToRemove is GraphicsLayer)
{
this.CleanLayerInstances(layerToRemove as GraphicsLayer);
this.CleanLayerItemViewModel(layerItemViewModel);
}
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();
}
else
{
foreach (var layer in this.VisibleLayers)
{
if (layer is GroupLayer)
{
this.RemoveLayerFromGroupLayer(layer as GroupLayer, selectedLayer);
}
}
}
}
}
}
private void CleanLayerItemViewModel(LayerItemViewModel layerItemViewModel)
{
foreach (var legendItem in layerItemViewModel.LegendItems.ToArray())
{
layerItemViewModel.LegendItems.Remove(legendItem);
}
}
private void CleanLayerInstances(GraphicsLayer layer)
{
foreach (var graphic in layer.Graphics.ToList())
{
if (graphic.Geometry is Polyline)
{
var line = graphic.Geometry as Polyline;
foreach (var path in line.Paths.ToList())
{
line.Paths.Remove(path);
path.Clear();
}
line.Paths = null;
}
graphic.MapTip = null;
graphic.Geometry = null;
layer.Graphics.Remove(graphic);
}
layer.Graphics = null;
}
So far I still get the same exception
... View more
06-24-2014
10:28 AM
|
0
|
8
|
4239
|
|
POST
|
If I add a Graphics Layer with its own spatial reference it is drawn. but if I add the shape file that contains it own spatial reference..it is not.
... View more
06-11-2014
08:14 AM
|
0
|
0
|
460
|
|
POST
|
DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far??? I had setup a small application that load a Map control, but I did not define a base map, therefore when the application runs, it only shows a blank space. then I proceed to load a shapefile in a local dynamic layer and add it to the map. I forgot to mention that I also added a legend control bond to the map...so if I add the shapefile, the legend shows me the name of the layer and the symbol. Why does the features in the shapefile are not shown?
... View more
06-06-2014
07:29 AM
|
0
|
2
|
3287
|
|
POST
|
Hi there!!!! I think I found it Digging inside the code of the toolkit, I found that in the process to apply the template, the object looks for an object called "TransformRotate" this object must be a RotateTransform instance. I tried to add a new object of this type to the template, but it was rejected, because it was not a UIElement. Looking carefully in the template I found that the Navigator already has an object of that kind:
<Grid x:Name="Navigator" Grid.Column="1" Height="125" Margin="3,0,0,0" RenderTransformOrigin="0.5,0.5" Width="125">
<Grid.RenderTransform>
<RotateTransform Angle="0"/>
</Grid.RenderTransform>
Soooooooo.....I decided to try to put the name of the object that is looked for:
<Grid x:Name="Navigator" Grid.Column="1" Height="125" Margin="3,0,0,0" RenderTransformOrigin="0.5,0.5" Width="125">
<Grid.RenderTransform>
<RotateTransform x:Name="TransformRotate" Angle="0"/>
</Grid.RenderTransform>
Voila!!!!!! the rotation.. WORKS
... View more
05-27-2014
02:19 PM
|
0
|
0
|
391
|
|
POST
|
Hi there!!!! I think I found it Digging inside the code of the toolkit, I found that in the process to apply the template, the object looks for an object called "TransformRotate" this object must be a RotateTransform instance. I tried to add a new object of this type to the template, but it was rejected, because it was not a UIElement. Looking carefully in the template I found that the Navigator already has an object of that kind:
<Grid x:Name="Navigator" Grid.Column="1" Height="125" Margin="3,0,0,0" RenderTransformOrigin="0.5,0.5" Width="125">
<Grid.RenderTransform>
<RotateTransform Angle="0"/>
</Grid.RenderTransform>
Soooooooo.....I decided to try to put the name of the object that is looked for:
<Grid x:Name="Navigator" Grid.Column="1" Height="125" Margin="3,0,0,0" RenderTransformOrigin="0.5,0.5" Width="125">
<Grid.RenderTransform>
<RotateTransform x:Name="TransformRotate" Angle="0"/>
</Grid.RenderTransform>
Voila!!!!!! the rotation.. WORKS
... View more
05-27-2014
02:19 PM
|
0
|
0
|
867
|
|
POST
|
have you got any results regarding this issue? I'm using the version 10.2.2, and it is still present, when I apply the style, rotation feature goes disable.
... View more
05-26-2014
10:49 AM
|
0
|
0
|
391
|
|
POST
|
Dear people from ESRI, also Concern Citizens have you got any results regarding this issue? I'm using the version 10.2.2, and it is still present, when I apply the style, rotation feature goes disable. I'm going to go deep to the code in GitHub, but I hope there is a simpla way to solve it.
... View more
05-26-2014
09:02 AM
|
0
|
0
|
867
|
|
POST
|
I am using a MVVM framework the load of the base map occurs afther the objects are created, due a lazy loading strategy. the slider is not showed because at the moment that map is linked to the navigation control (XAML declaration), neither the map does not have resolution defined, nor the base map has been loaded. So...my solution was to set up the map to the navigation control after the basemap is initialized (ArcGISTiledMapServiceLayer.initialized event), in that way the navigation found the parameters required. Rotation is not enabled...maybe for the custom style applied:(
... View more
05-26-2014
08:55 AM
|
0
|
0
|
1001
|
|
POST
|
I'm facing the same issue, despite the fact that I set up the resolution, furthermore, I only have a tiled layer from ArcGIS online. I was looking for the template that decribes the appearance of the navigation control, but it does not help me a lot Any other suggestion? I just discover that the rotation capability is disable 😞
... View more
05-23-2014
12:48 PM
|
0
|
0
|
1001
|
|
POST
|
well....finally I solved the issue. this is quite tricky: App A: Works Fine References to the dll in the program files folder. App B: do not work references to a third party references folder in TFS. build drop folder contains a Deploy folder created with the ArcGIS Runtime WPF Deployment Builder 10.2.2 Something that is not mentioned neither in the documentation of the example or in the documentation of the classes involved in the creation of a Dynamic layer is that you must select some items for a correct deployment. My application was run from a folder with a deployment folder inside, so it instantiate a local server using the dll's and configuration specified for it (that was the reason i did'nt get any log file). I was reading something for deployment task when I found what i was missing, so i rebuild a deployment folder including the Vector additional data format, also the logging feature. the problem was solved. Funny fact: after replacing the folder the issue descriped here http://forums.arcgis.com/threads/109301-Legend-item-template-brings-a-huge-image....Why was fixed!!!! Why, How, i do not know. Thanks a lot for your replies P.S. It is necessary an improvement in the documentation, really.
... View more
05-19-2014
10:22 AM
|
0
|
0
|
1734
|
|
POST
|
Hi Dominique... I'm trying to reproduce the behavior in a isolate environment. so far i dont get it.
... View more
05-16-2014
07:47 AM
|
0
|
0
|
1322
|
|
POST
|
Hello Mike!!! sorry my absence....i decide to take a small vacation from this problem in order to fix my ideas about it. I'm trying to reproduce the behavior in a bootstraped application with MEF, but in it, the application works fine ....maybe the code of the other application is haunted. I continue with my efforts to undertand the JSON messages. I set up my visual studio to raise ANY exception, but it only fires the one that state that it cannot found the datasource. Why the Local Server does not create log files, despite the fact that the coinfiguration is set to do it?
... View more
05-16-2014
06:01 AM
|
0
|
0
|
547
|
|
POST
|
the graphics are lines, and in the map, they appear as expected. in an isolated simple application, the symbology appears in the legend control in a width of 32*29 pixels ImageSource object. but in my production application the size is ten times
... View more
05-16-2014
05:58 AM
|
0
|
0
|
1322
|
|
POST
|
Hi Dominique I set up the renderer, and it appear in the map
... View more
05-16-2014
05:49 AM
|
0
|
0
|
1322
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 12-01-2023 02:45 AM | |
| 1 | 07-19-2021 11:25 PM | |
| 1 | 07-21-2023 04:44 AM | |
| 1 | 07-07-2023 05:15 AM | |
| 1 | 01-19-2023 03:19 AM |
| Online Status |
Offline
|
| Date Last Visited |
08-02-2024
12:42 AM
|