AnsweredAssumed Answered

Working from geometry to feature to map, can't display polygon feature

Question asked by jill_the_pill on Jan 26, 2017
Latest reply on Feb 7, 2017 by jill_the_pill

I've created a valid polygon geometry.

CTcorners = { 'rings' : [[[-72.0,42.0],[-72.1,42.0],[-72.1,42.1],[-72.0,42.1],[-72.0,42.0]]]} # clockwise

CTpolygeom = arcgis.geometry.Polygon(CTcorners)

I converted it to a feature.

CTpoly = arcgis.features.Feature(CTpolygeom)

That step seems to work properly, but when I try to add it to the map,

map2 = gis.map('Connecticut') # focus on CT                     
map2.basemap = 'topo'
map2.add_layer(CTpoly)
map2

it throws the error:

TypeError: argument of type 'Feature' is not iterable

on the add_layer line.  Do I need to make a layer of it for display maybe?

 

ps -- is 'rings' a reserved term in this context or arbitrary?  Thanks.

Outcomes