Join Spatial Dataframes into one Feature Service

380
0
01-23-2018 08:59 AM
SimonGeigenberger
New Contributor III

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?

rsingh-esristaff

0 Kudos
0 Replies