AnsweredAssumed Answered

Join Spatial Dataframes into one Feature Service

Question asked by s.geigenbergeresri-de-esridist Employee on Jan 23, 2018

I have different Spatial Dataframes which I want to combine in one Feature Service. As the Dataframes have different geometry types and attributes I need one Feature Service with different Layers. First I created an empty Feature Service and tried to update the layer's section of the service definition. The following workflow did not work and there was no change in the service definition.

 

newService = gis.content.create_service("CombineLayers_New", service_type='featureService')

newFeatureLayerCollection = features.FeatureLayerCollection.fromitem(newService)

dictLayer = {}
dictLayer["geometryType"] = "esriGeometryPoint"
dictLayer["name"] = "AuGeoPoints"
dictLayer["id"] = 0

layersList = []
layersList.append(dictLayer)

dictUpdate = {"layers" : layersList }
newFeatureLayerCollection.manager.update_definition(dictUpdate)

 

How can I publish a Feature Service and add more than one Feature Layer?

 

Rohit Singh

Outcomes