Select to view content in your preferred language

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

3551
10
Jump to solution
04-03-2014 02:25 PM
Cristian_Galindo
Frequent Contributor
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.
0 Kudos
10 Replies
Cristian_Galindo
Frequent Contributor
could it work if I unpack the package (using 7Zip.dll), change the map name, then Pack it again...and use it?

i think i will try it, what do you think?
0 Kudos