AnsweredAssumed Answered

Local feature service with copied package files uses the same unpacked folder

Question asked by xtian79 on Apr 3, 2014
Latest reply on Apr 9, 2014 by xtian79
DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far???

When creating two LocalFeatureService I use two package files to define each service. the file package2 is a copy of the file package1.

               var localCenterlineServiceMPK = new LocalFeatureService()    {                                                         Path = @"C:\package1.mpk",     MaxRecords = 100000    };     ArcGISLocalFeatureLayer lineLayer = null;     localCenterlineServiceMPK.Start();     lineLayer = new ArcGISLocalFeatureLayer    {     Url = localCenterlineServiceMPK.UrlFeatureService + "/0",     Service = localCenterlineServiceMPK,     ID = "lines",     LayerName = "lines",     Editable = true,     DisableClientCaching = true,     AutoSave = false,     Mode = FeatureLayer.QueryMode.Snapshot,     OutFields = new OutFields { "*" }    };              var localCenterlineServiceMPK2 = new LocalFeatureService()             {                 Path = @"C:\package2.mpk",                 MaxRecords = 100000             };              ArcGISLocalFeatureLayer lineLayer2 = null;              localCenterlineServiceMPK2.Start();              lineLayer2 = new ArcGISLocalFeatureLayer             {                 Url = localCenterlineServiceMPK.UrlFeatureService + "/0",                 Service = localCenterlineServiceMPK,                 ID = "lines",                 LayerName = "lines",                 Editable = true,                 DisableClientCaching = true,                 AutoSave = false,                 Mode = FeatureLayer.QueryMode.Snapshot,                 OutFields = new OutFields { "*" }             };              this.MyMap.Layers.Add(lineLayer);             this.MyMap.Layers.Add(lineLayer2);


When I check the folder C:\Users\XXXX\AppData\Local\ArcGISRuntime\Documents\ArcGIS\Packages there is only one folder : package1...

If I perform changes in the graphics of the layer lineLayer those changes are also visible in the lineLayer2. due both layers are sharing the same fileGDB.

Is there a way to force the ArcGISRuntime to unpack  both file packages (despite the fact that one is a copy), so the changes in one layer wont affect the other one.

Outcomes