I am struggling to create a multi-layer feature service with Custom Data Feeds. Function getData returns a geojson of this structure:
const geojson = {
type: "MultiLayerFeatureCollection",
layers: [
{
layerName: "Agriculture Layer 0",
type: "FeatureCollection",
features: layer0Features,
metadata: layer0Metadata
},
{
layerName: "Agriculture Layer 1",
type: "FeatureCollection",
features: layer1Features,
metadata: layer1Metadata
}
]
};
Since I have a possibility to check layers, then I suppose that it should be possible to create a feature class with multiple layers. So I guess the problem should be somewhere in the json structure passed as the output of the model.js.