AnsweredAssumed Answered

Convert Feature Layer to an array of Polygons in ArcGIS JS?

Question asked by TacoB0T on Feb 13, 2017
Latest reply on Feb 13, 2017 by cgishack

Pretty straight forward: I am simply trying to get a feature layer

 

var floodLayer = new FeatureLayer("URL");

 

and convert it to a polygon array similar to:

var polygons = [];

 

 for (var i = 0; i < floodLayer.graphics.length; i++) {

var polygons[i] = new Polygon({ "rings": floodLayer.graphics[i].rings, "spatialReference": floodLayer.graphics[i].spatialReference });

}

However, feature layers don't appear to have the appropriate properties to create polygons. Unless I am missing something?

Outcomes