POST
|
Check this article http://iamgisp.com/the-wpf-applications-crash-when-using-stylus-for-drawing-poly-lines-and-polygons/
... View more
06-18-2016
12:22 PM
|
0
|
0
|
256
|
POST
|
Hi, Ref : ArcGIS Runtime 10.2.04 for .NET We are facing a crash while using stylus to perform drawing with the help of MapView.Editor.RequestShapeAsync method. The following is the method. The UI for the application is built on WPF and ArcGIS Runtime 10.2.04 for .NET. As a workaround, we are using a delay of 200ms, but that workaround brings down crash issue but always while drawing a second polygon, the first click (or pen tap) is always ignored. This happens only with Stylus. Any suggestions.. to track down the error, I have extended the Editor class and added log statements within OnGenerateSymbol, I can share it with you if that helps. private async void Button1_Click(object sender, RoutedEventArgs e) { if (MapView1.Editor == null) return; if (MapView1.Editor.IsActive) MapView1.Editor.Cancel.Execute(null); try { InPolygonDrawMode = true; InPolylineDrawMode = false; while (InPolygonDrawMode) { MapView1.Editor = te; LogInfo("begin geom at " + DateTime.Now.ToString("hh.mm.ss.ffffff")); Geometry myGeometry = await MapView1.Editor.RequestShapeAsync(DrawShape.Polygon); LogInfo("end geom at " + DateTime.Now.ToString("hh.mm.ss.ffffff")); SimpleFillSymbol myPolygonSymbol = (SimpleFillSymbol)LayoutRoot.Resources["MyPolygonSymbol"]; Graphic myGraphic = new Graphic(myGeometry, myPolygonSymbol); ThisGraphicsLayer.Graphics.Add(myGraphic); MapView1.Editor = null; LogInfo("Before delay " + DateTime.Now.ToString("hh.mm.ss.ffffff")); await Task.Delay(200); LogInfo("After delay " + DateTime.Now.ToString("hh.mm.ss.ffffff")); } } catch(TaskCanceledException t){ LogInfo("TaskCanceled at " + DateTime.Now.ToString("hh.mm.ss.ffffff")); } catch(Exception ex) { InPolygonDrawMode = false; } }
... View more
12-24-2015
02:03 PM
|
0
|
1
|
4224
|
POST
|
Gail, You are right, May be if some one requires, I am posting C# version of your implementation static void doTestFGDB(){ //This test assumes two datasets and one of them holds AdministrativeAreas IWorkspace wkspc = fGDBWorkspaceFromString(@"C:\issues\815849\LTDS_20_931.gdb"); IWorkspaceEdit workspaceEdit = (IWorkspaceEdit)wkspc; workspaceEdit.StartEditing(false); IFeatureWorkspace fw = wkspc as IFeatureWorkspace; IFeatureClass fc = fw.OpenFeatureClass("AdministrativeAreas"); IDatasetEdit de = fc as IDatasetEdit; try { Console.WriteLine(de.IsBeingEdited()); // When AdministrativeAreas is open in ArcMap for editing - FALSE // When AdministrativeAreas is removed from ArcMap editing - FALSE // When parent datset(AdministrativeAreas) is removed and second dataset is opened in editing - TRUE } catch (Exception e) { Console.WriteLine(e.Message); } Console.WriteLine("TEST finished"); }
... View more
06-15-2010
09:53 AM
|
0
|
0
|
243
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:22 AM
|