accessed layer from webmap, done, but can not view properties , any help? Thanks!
Hello Gary,
It might be because the major_cities_layers[0] does not have the properties attribute on it. This is the way I get attributes from a layer....
import arcgis
from arcgis.gis import GIS
gis = GIS()
featureLayerItem = gis.content.get('id for your feature layer')
print(featureLayerItem.layers[0].properties.extent)
Which returns this....
{
"xmin": -178.21759836236583,
"ymin": 18.921786345087018,
"xmax": -66.9692710360024,
"ymax": 71.40623535327114,
"spatialReference": {
"wkid": 4269,
"latestWkid": 4269
}
}
Thank you for your reply! it works! Thanks much!