WHAT WE NEED Guidance on how to identify the causes of the issues we are having adding a new point to the layer. Is it a process problem? Is it a code problem? If so, who can help us identify the failure points?
The full source code is available if it would be helpful for you to decipher the issue.
We have created our project in Visual Studio 2008 .net 2.0. What we can do: - Run the project in Debug mode through Windows Mobile 6 classic Emulator - Load a MobileCache of 6 Feature Layers ??? 3 editable with existing feature points & 3 as background data - ZoomIn, ZoomOut, Pan, IdentifyFeature on map using toolbar control - Load Existing Feature Data to screens when using the IdentifyFeature toolbar function What we can???t do (identified so far): - Adding new Feature Point - How we are attempting this: - Click toolbar button - Click map to add new feature - Run code that we have sourced from multiple different online examples in an attempt to add a new point ??? we have had several different stages of errors thrown from the ???The geometry is empty???, to completely destroying the MobileCache Example of current relevant code private void toolBar1_ButtonClick(object sender, ToolBarButtonClickEventArgs e) { switch (toolBar1.Buttons.IndexOf(e.Button)) { case 0: MapMain.CurrentMapAction = zoomInMapAction1; break; case 1: MapMain.CurrentMapAction = zoomOutMapAction1; break; case 2: MapMain.CurrentMapAction = panMapAction1; break; case 3: MapMain.CurrentMapAction = null; break; case 4: MapMain.CurrentMapAction = addVertexSketchTool1; break; default: break; } } private void MapMain_MouseDown(object sender, ESRI.ArcGIS.Mobile.MapMouseEventArgs e) { if (MapMain.CurrentMapAction == addVertexSketchTool1) { AddNewFeaturePoint(); } } private void AddNewFeaturePoint() { sketchGraphicLayer1.Geometry = new ESRI.ArcGIS.Mobile.Geometries.Point();
//this im chaging position of first record fdt.Rows[0][fdt.GeometryColumnIndex] = newPoint; //fdt - featureDataTable fdt.SaveInFeatureSource(); fdt.AcceptChanges();