POST
|
We have had the same issue but we have solved the problem. See the forum post below. http://forums.arcgis.com/threads/71945-unable-to-add-save-new-feature-point-to-mobile-cache-on-ArcMobile-10.
... View more
12-06-2012
02:35 PM
|
0
|
0
|
191
|
POST
|
Thanks everyone for all of your suggestions, we have now solved this thank to Shane Pienaar. It turns out the issue was around the mobile cache being stored on the Storage Card not on the device or emulator itself. Problem solved! 🙂
... View more
12-06-2012
02:32 PM
|
0
|
0
|
512
|
POST
|
Hi! Any replies to this? I'm trying to do the same thing but as a relatively new user I am having difficulty.
... View more
12-03-2012
10:10 AM
|
0
|
0
|
171
|
POST
|
Thanks for your reply Thad! I did actually have the geometry being set that way, but I�??d removed it wondering if that was causing the problem then forgot to re-add it to the example code. Thanks for the reminder, frustratingly we are still having problems though. The cache appears to be fine as we can load it onto a window application that we have and it works fine. What would be really great would be to be able to find an example mobile application that adds/edits features. Do you know of anyone who can provide this?
... View more
11-28-2012
10:01 AM
|
0
|
0
|
512
|
POST
|
Thanks for your comment, I�??m having trouble implementing it though. In the case of a new feature row we are adding, there is no populated ObjectID to multiply and it appears that when you add or edit a feature, there must be a metadata table within the MobileCache that tracks the total number of features within that layer that have been changed, and then automatically increments and assigns that number in negative format to the ObjectID. In the case of an edit, I attempted to set the ObjectID as per you code, and it fails as the field is ReadOnly. I�??m a bit puzzled as it appears that there�??s no problem with the MobileCache as it works successfully in the Windows project. However, when I use the same code that is implemented within the Windows application in our mobile application (which appears to be the same as all of the code examples that I�??ve seen for Mobile applications), it fails. It�??s almost like there is a project specific ReadOnly setting on the MobileCache. Could you help us with this please?
... View more
11-27-2012
11:03 AM
|
0
|
0
|
512
|
POST
|
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(); FeatureLayer locationLayer = mobileCache1.Layers["Location"] as FeatureLayer; using (FeatureDataTable locationTable = locationLayer.GetDataTable()) { DataRow locationRow = locationTable.NewRow(); locationRow.BeginEdit(); locationRow["LocationID"] = Guid.NewGuid(); locationRow[locationLayer.GeometryColumnIndex] = sketchGraphicLayer1.Geometry; locationRow.EndEdit(); locationTable.Rows.Add(locationRow); locationTable.SaveInFeatureLayer(); DataRow[] errors = locationTable.GetErrors(); for (int i = 0; i < errors.Length; i++) { if (errors.HasErrors) { DataColumn[] colArr = errors.GetColumnsInError(); for (int j = 0; j < colArr.Length; j++) { MessageBox.Show(string.Format("Error '{0}' in column '{1}'.", errors.GetColumnError(colArr ), colArr .ColumnName)); } } } } }
... View more
11-21-2012
01:06 PM
|
0
|
10
|
4036
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|