AnsweredAssumed Answered

Edit shapefiles from mpk package

Question asked by JohanPersson on Aug 19, 2014
Latest reply on Aug 19, 2014 by JohanPersson

I am working on a test application to evaluate the ArcGIS Runtime as a replacement for an old MapObjects application that we have. I have run into two problems that I have not yet been able to solve. I have created a mpk file in ArcMap that contains a simple TIFF map raster image and a polygon layer (shp) that has two features drawn. The shapefile layer was originally created using the old MapObjects application.


Problem 1: The mpk is loaded without any problems into my appplication and when the shapefile is assigned to the EditorWidget as an ArcGISLocalFeatureLayer I am able to select features, add features and delete features on the layer, but I cannot get the saving of the layer to work. The "Save" icon in the EditorWidget gets enabled but when I press it, it does not get disabled and the changes are not committed to the layer. I have tested both mpk with embedded contents and the "Reference all data" with the same result. I have tested the "EditingOffline" sample application available on the net and the saving of the layer of the sample mpk package works there and in my application. Saving of the layer from my mpk does not work in the sample application nor in my application. So I suspect that there is something wrong with my mpk package. Is there any setting or ption I need to select before generating the mpk file in order to have the layer editable?


Problem 2: I generated an mpk package containing the TIFF map raster image and an empty shp shapefile (line type). This shapefile was also originally created using MapObjects and the purpose of having it in the mpk is to use it as a tracking layer for persistant storage of the tracking history of the GPS position in the ArcGIS Runtime application. However, when I load the mpk in my test application, nothing of the contents appears on the map. If I remove the empty layer, the package loads without any problems again. I don't get any exceptions or error messages, it looks like the loading or display of the package is just interrupted. Are there any known limitations or is it considered a "bad practise" to handle empty layers?