Select to view content in your preferred language

Adding FeatureLayer data without a map

2059
2
09-10-2013 10:48 AM
Labels (1)
KenDoman
Frequent Contributor
I'm working on a mobile tablet application that spends most of the time disconnected from the internet. When the application is connected to the internet, it's supposed to query and add data to a FeatureService. Is there a way to query/edit data in a FeatureLayer without adding the layer to a map?

I'm using the 10.1 WPF SDK, and the client will not be upgrading to 10.2 servers for a while, so I can't use disconnected editing.
0 Kudos
2 Replies
AnttiKajanus1
Deactivated User
Hi,

You can work with FeatureLayer without map but you need to define mode to Snapshot.

  this.targetService = new FeatureLayer{
    Url = @"http://services.arcgis.com/4PuGhqdWG1FwH2Yk/ArcGIS/rest/services/DemoCyclingRoutesFinland/FeatureSer...",    
    Mode = FeatureLayer.QueryMode.Snapshot
};
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

You'll also need to handle the UpdateCompleted event to know that the feature layer actually contains data. See this thread for more information: http://forums.arcgis.com/threads/43853-How-to-edit-a-table-from-local-map-package.

Cheers

Mike
0 Kudos