Closed phaakma closed 1 year ago
Layer
is a base class, and really shouldn't be used. What are you trying to do?
Hi. Thanks for reply - this report is simply pointing out that the documentation differs from implementation, and pointing out what is expected based on the docs.
This will be fixed for the next release, thanks for pointing it out
Describe the bug The arcgis.gis.Layer class has a method called fromitem. The documentation is unclear. In the documentation online the example says it returns a layer from an Item object, but then for the input parameters says to pass in the id of an item as a string. The example given in the documentation also shows passing in the item id as a string. But doing this throws an error saying: 'str' object has no attribute 'layers'
This is because the method requires an Item object. Passing in an Item object works.
To Reproduce Steps to reproduce the behavior:
error:
Screenshots If applicable, add screenshots to help explain your problem.
Expected behavior Passing in either an item id as a string or an Item object should return the layer.
Platform (please complete the following information):
Additional context Add any other context about the problem here, attachments etc.