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