AnsweredAssumed Answered

How to create a esri service with more than one layer

Question asked by GENDRAUD on Aug 30, 2018

Hello

 

I have created 2 layers in my arcgis developer dashboard. ArcGIS for Developers 

I wanted to load this 2 layers in the same geodatabase in my computer.

 

this is  the code to load a layer from the url in a geodatabase:

string SyncServiceUrl = "https://services9.arcgis.com/8FH92CDaNsh8fPyG/arcgis/rest/NAMEOFMYLAYER/FeatureServer";         Uri uri = new Uri(SyncServiceUrl);         GeodatabaseSyncTask gdbTask = await GeodatabaseSyncTask.CreateAsync(uri);         Esri.ArcGISRuntime.Geometry.Envelope _extent = new Esri.ArcGISRuntime.Geometry.Envelope(-95.3035, 29.0100, -95.1053, 29.1298, Esri.ArcGISRuntime.Geometry.SpatialReferences.Wgs84);         GenerateGeodatabaseParameters gdbParams = await gdbTask.CreateDefaultGenerateGeodatabaseParametersAsync(_extent);         GenerateGeodatabaseJob generateGdbJob = gdbTask.GenerateGeodatabase(gdbParams, @"C:\Users\pogendraud\Documents\ARCGIS\data\noempty.geodatabase");         Geodatabase _localGeodatabase = await generateGdbJob.GetResultAsync();

 

 i have only a database with only one layer after this operation

 

here there is the overview of my layer ooooo

 it has the services URL  that can be used by the code i have shown.

and layer is with a S. Therefore i supposed it's possible to add one more layer to a service.

like here :

https://sampleserver6.arcgis.com/arcgis/rest/services/Sync/SaveTheBaySync/FeatureServer/ 

 

I have tried to create to layer with the same name to have the url service with the same name and after load the layer in the geodatabse. But it's not the solution. arcgis prevent me to do that.

Outcomes