Good Day
I have a bunch of assets which are MutliLineStrings that are sent to a Stream Layer. I need to query them using the StreamLayerView and append some of them to a Feature Layer so I can dynamically work with them. The issue is when I clone the feature from the StreamLayerView, and add it to the Feature Layer, it doesn't show up correctly. The grey lines are from the StreamLayer, and they are correct. The red line is the one I cloned from the Layer View, and added to the Feature Layer.

const query = {
outFields: ['*'],
where: '1=1',
returnGeometry: true
}
this._view.map.layers.forEach((layer: StreamLayer) => {
if (layer.type === 'stream') {
this._view.whenLayerView(layer).then((layerView: StreamLayerView) => {
layerView.queryFeatures(query).then((features) => {
const newFeatures = [];
features.features.forEach((feature) => {
newFeature.push(feature.clone())
})
})
}
})
this.featureLayer =
new FeatureLayer(
this.buildFeatureLayer(
newFeatures[0].geometry.type,
fields,
newFeatures
)
)
The code above is just a sample, but what would cause the issue I'm experiencing? Is there a way to prevent it, the StreamLayer is showing the feature correctly, so I'm assuming it's a problem from the StreamLayerView query?
Thanks