Is it possible to create a featureTable from a featureLayer that was made from a featureCollection?

615
0
04-20-2017 02:19 PM
JoshuaMcCurry
New Contributor III

I have made a featureLayer from a featureCollection like in the following example:

require([
  "esri/layers/FeatureLayer", ... 
], function(FeatureLayer, ... ) {
  var layerDefinition = {
    "geometryType": "esriGeometryPolygon",
    "fields": [{
      "name": "BUFF_DIST",
      "type": "esriFieldTypeInteger",
      "alias": "Buffer Distance"
    }]
  } 
  var featureCollection = {
    layerDefinition: layerDefinition,
    featureSet: null
  };
  var featureLayer = new FeatureLayer(featureCollection, {
    showLabels: true
  });
  ...
});

I have added it to the map, so I know it works.

However, when I try to create a featureTable from the new featureLayer...no dice. 

I have created a featureTable from a featureLayer that uses a rest endpoint with no problems. I'm just wondering if there is something i'm missing with the feature collection. Any advice is much appreciated.

Thanks

0 Kudos
0 Replies