Select to view content in your preferred language

How do i enable edit in FeatureLayer

6716
6
Jump to solution
02-17-2015 11:42 PM
HassanShatnawi
Deactivated User

Hello every one

I've create FeatureLayer from GeodatabaseFeatureTable like this

FeatureLayer featureLayer = new FeatureLayer(geodatabaseFeatureTables.get(index++));
             featureLayer.setEnableLabels(true);
             mMapView.addLayer(featureLayer);

but when I'm trying to delete some Feature in the table I got an Exception till me that the table not editable and edit option not enabled

featureLayer.getFeatureTable().deleteFeature(featureLayer.getID());

so how to enable editing

Note: the code in android - Esri-android-SDK -

Thanks in advance

0 Kudos
1 Solution

Accepted Solutions
TeroRönkkö
Regular Contributor

It means you can only edit layers that have been published as featureservice in ArcGis online/portal.

License your app—ArcGIS Runtime SDK for Android | ArcGIS for Developer

Note features for basic level/standard level. There is working offline edits example in ArcGis sdk samples.

Sync offline edits—ArcGIS Runtime SDK for Android | ArcGIS for Developers

View solution in original post

0 Kudos
6 Replies
TeroRönkkö
Regular Contributor

What I understand from the licensing and documentation first of all you would need standard license (with oauth login to arcgis online) AND to have that featurelayer to be fetched from featureservice as offline featurelayer.

I couldn't create database with desktop and do anything to it because it is not ArcGis Server featureservice originally.

So I believe it is like this:

Oauth with ArcGis online/Portal (get standard license) -  Fetch offline layer to local database - Go offline - do edits - repeat until ready -  push back edits to featureserver.

0 Kudos
HassanShatnawi
Deactivated User

is that mean I should download my layers from service ????

is that mean I can't Edit layers in my .geodatabase file that stored in my sdcard ????

can you put the link of documentation you read for this issue

thanks in advance

0 Kudos
TeroRönkkö
Regular Contributor

It means you can only edit layers that have been published as featureservice in ArcGis online/portal.

License your app—ArcGIS Runtime SDK for Android | ArcGIS for Developer

Note features for basic level/standard level. There is working offline edits example in ArcGis sdk samples.

Sync offline edits—ArcGIS Runtime SDK for Android | ArcGIS for Developers

0 Kudos
nie
by
Emerging Contributor

You need to publish feature services using ArcGIS Server, or ArcGIS Online, then connect to the feature service in your Android APP and generate offline .geodatabase files.

.geodatabase files from ArcGIS Desktop is read-only.

I don't think to license the app is necessary during the developing period. The only thing may bother you is the watermark.

0 Kudos
AneteFridrihsone
Deactivated User

Hi,

I noticed you used featureLayer.setEnableLabels(true);. Ive tried to use it too, but I cannot find where to specify labels field or other properties. Can you please share that! Thanks much!

0 Kudos
WillCrick
Deactivated User

Dian, i think your post is a separate question about setting labels. Please create a new post for this if you are still not able to do what you need.

Thanks

Will

0 Kudos