AnsweredAssumed Answered

Create Feature Layer using ArcGIS API for Python

Question asked by zneumann_usfs on Mar 3, 2017
Latest reply on Nov 20, 2018 by philna_BMI

I have a feature layer hosted in my organization that I want to turn into a new feature layer in my content, similar to this functionality:

 

I was messing around with some code:

base_comment_layer = gis.content.get('# acutal item ID goes here')

layer_properties={
'title':'Test_Comment_Layer',
'description':'This is a comment layer that is being used for testing purposes only',
'tags':'TPCM, Test, Python, Comment Layer'
}

 

gis.content.add(item_properties=layer_properties, data=base_comment_layer, folder='test_NF')

but that didn't seem to work, I was getting an error:

AttributeError: 'Item' object has no attribute 'replace'

This is obviously after longing on using the GIS() method.

Any adivice?

 

Thanks.

Outcomes