Hello,
I am wondering what I am doing wrong in regards to trying to add another layer to an already published Feature Layer Collection (flc). The FLC that is already published contains a point layer and a related table. I want to add another point layer with a related table to it.
I am trying to use the FeatureLayerCollectionManager.insert_layer() but I receive this error: 'FeatureLayerCollectionManager' object has no attribute 'insert_layer'
My code so far:
item = gis.content.search(query='title:asc')[0]
type(item)
## arcgis.gis.Item
flc = FeatureLayerCollection.fromitem(item)
type(flc)
## arcgis.features.layer.FeatureLayerCollection
flc.manager.insert_layer(r"local path to shapefile.zip")
## AttributeError: 'FeatureLayerCollectionManager' object has no attribute 'insert_layer'
Solved! Go to Solution.
It seems you may be on a version of the API that does not have that function. I am on Version 2.3.0 and do have access to the function.
It seems you may be on a version of the API that does not have that function. I am on Version 2.3.0 and do have access to the function.
You are right - I am currently working with v2.1.0.4 and updating to the latest has solved it. Thanks.
Unfortunately, my production environment is stuck on v2.1.0.4 so will have to use the old-fashioned route of editing the definition...