Select to view content in your preferred language

mobile package, feature layers are not editable

4152
12
10-11-2017 11:06 AM
MohamedNabil1
Occasional Contributor

Hi,

I  created mobile package with ArcGIS Pro, when I load it using ArcGIS Runtime SDK for .NET,  I found that FeatureTable.IsEditable is always false.

How can I enable editing in feature layers in the mobile package (mmpk)?

Thanks

12 Replies
NagmaYasmin
Esri Contributor

Hi,

You need to use OfflineMapTask.CreateAsync() method to generate MMPK file. In this way when the map is taken offline, it is stored as a mobile map. If the map contains sync-enabled feature layers, those can be edited offline as well, otherwise generated MMPK from Pro isn't editable.

Hope that helps. Thanks

 

MohamedNabil1
Occasional Contributor

Thanks

0 Kudos
DawnStalberg
Emerging Contributor

I came across the same issue after creating a mobile map package from ArcGIS Pro for use on a mobile platform. I followed the sample code for CreateAsync(Map) to enable editing. The mmpk is loaded at runtime and does not have a portal reference. The user needs to be allowed to update the non-spatial attribute data in the feature class and their changes do not need to be sync'd back to a portal item - it is just used to demonstrate how changing the attributes changes the symbology on the map. I initially tried to use FeatureTable.UpdateFeatureAsync(feature) but received an error that the underlying map is readonly. Then I found this post. Now there is an error when trying to use CreateAsync - "Illegal state: The online map must have an item property which is its online portal item". I tried uploading the mmpk to ArcGIS Online, but keep receiving 502 errors during the upload.

Is there any way to make an already offline mobile map pacakge created from Pro available for editing of attributes (with no need to sync)?

0 Kudos
MarkBockenhauer
Esri Regular Contributor

Hi Dawn,

Mobile map packages created with ArcGIS Pro are read only, not meant to be editable.

Mark

0 Kudos
DawnStalberg
Emerging Contributor

Thank you, Mark.

In that case, which format can we use to generate offline content for which the non-spatial attributes can be edited but not sync'd or persisted?

0 Kudos
JoeHershman
MVP Regular Contributor

The only way to generate editable offline map package is through the OfflineMapTask.  The link gives a pretty detailed example of how it is done.  I believe the long term plan is to allow map packages developed in Pro to be editable, but it is not available at this time.

Thanks,
-Joe
0 Kudos
DawnStalberg
Emerging Contributor
0 Kudos
ModyBuchbinder
Esri Regular Contributor

Hi Joe

We have the need to edit packages offline on cellular or laptops (include geometries) and to post it back to the main database.

What is the correct way to do it currently?

I understand you need to write a program (in RunTime API)  that will extract and create the package.

Then you can take the package to RunTime applications on mobile and edit it without network.

Then you need to sync it back - how?

Thanks

0 Kudos
JoeHershman
MVP Regular Contributor

Have you looked at Collector?  If you don't have specific custom needs Collector will let you do what you decribe

Thanks,
-Joe
0 Kudos