<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: StreamLayerView issue cloning feature into Feature Layer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/streamlayerview-issue-cloning-feature-into-feature/m-p/1612980#M87111</link>
    <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Would you mind sharing a simple reproducible example? It would help us understand the issue more clearly and troubleshoot it faster.&lt;/P&gt;</description>
    <pubDate>Thu, 08 May 2025 20:49:19 GMT</pubDate>
    <dc:creator>UndralBatsukh</dc:creator>
    <dc:date>2025-05-08T20:49:19Z</dc:date>
    <item>
      <title>StreamLayerView issue cloning feature into Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/streamlayerview-issue-cloning-feature-into-feature/m-p/1612911#M87109</link>
      <description>&lt;P&gt;Good Day&lt;BR /&gt;&lt;BR /&gt;I have a bunch of assets which are MutliLineStrings that are sent to a Stream Layer.&amp;nbsp; I need to query them using the StreamLayerView and append some of them to a Feature Layer so I can dynamically work with them.&amp;nbsp; The issue is when I clone the feature from the StreamLayerView, and add it to the Feature Layer, it doesn't show up correctly.&amp;nbsp; The grey lines are from the StreamLayer, and they are correct.&amp;nbsp; The red line is the one I cloned from the Layer View, and added to the Feature Layer.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot From 2025-05-08 12-50-24.png" style="width: 145px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/131788i09444400EF8816BA/image-size/small?v=v2&amp;amp;px=200" role="button" title="Screenshot From 2025-05-08 12-50-24.png" alt="Screenshot From 2025-05-08 12-50-24.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const query = {
    outFields: ['*'],
    where: '1=1',
    returnGeometry: true
}

this._view.map.layers.forEach((layer: StreamLayer) =&amp;gt; {
	if (layer.type === 'stream') {
		this._view.whenLayerView(layer).then((layerView: StreamLayerView) =&amp;gt; {
			layerView.queryFeatures(query).then((features) =&amp;gt; {
                        const newFeatures = [];
            		features.features.forEach((feature) =&amp;gt; {
            	            newFeature.push(feature.clone())
			})
		})
	}
})

this.featureLayer =
    new FeatureLayer(
        this.buildFeatureLayer(
            newFeatures[0].geometry.type,
            fields,
            newFeatures
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code above is just a sample, but what would cause the issue I'm experiencing?&amp;nbsp; 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?&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 16:59:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/streamlayerview-issue-cloning-feature-into-feature/m-p/1612911#M87109</guid>
      <dc:creator>AndrewMurdoch1</dc:creator>
      <dc:date>2025-05-08T16:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: StreamLayerView issue cloning feature into Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/streamlayerview-issue-cloning-feature-into-feature/m-p/1612980#M87111</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Would you mind sharing a simple reproducible example? It would help us understand the issue more clearly and troubleshoot it faster.&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 20:49:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/streamlayerview-issue-cloning-feature-into-feature/m-p/1612980#M87111</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2025-05-08T20:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: StreamLayerView issue cloning feature into Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/streamlayerview-issue-cloning-feature-into-feature/m-p/1612984#M87112</link>
      <description>&lt;P&gt;There's no way to set up a simple Stream Layer example, it would involve setting up a backend, database, frontend, and hooking it altogether, If I give you a SQL file, GO Backend, Angular Frontend, would that work? Can you run each separate part?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 20:57:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/streamlayerview-issue-cloning-feature-into-feature/m-p/1612984#M87112</guid>
      <dc:creator>AndrewMurdoch1</dc:creator>
      <dc:date>2025-05-08T20:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: StreamLayerView issue cloning feature into Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/streamlayerview-issue-cloning-feature-into-feature/m-p/1613004#M87114</link>
      <description>&lt;P&gt;Can you please post the geometry (json representation) that is in question here?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 21:44:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/streamlayerview-issue-cloning-feature-into-feature/m-p/1613004#M87114</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2025-05-08T21:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: StreamLayerView issue cloning feature into Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/streamlayerview-issue-cloning-feature-into-feature/m-p/1613009#M87115</link>
      <description>&lt;P&gt;I am not able to reproduce the issue in this simple test app -&amp;nbsp;&lt;A href="https://codepen.io/U_B_U/pen/MYYqErz?editors=1000" target="_blank"&gt;https://codepen.io/U_B_U/pen/MYYqErz?editors=1000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 21:49:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/streamlayerview-issue-cloning-feature-into-feature/m-p/1613009#M87115</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2025-05-08T21:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: StreamLayerView issue cloning feature into Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/streamlayerview-issue-cloning-feature-into-feature/m-p/1613014#M87116</link>
      <description>&lt;P&gt;Good Evening&lt;BR /&gt;&lt;BR /&gt;It seems to be a problem with the Feature Layer not redrawing the features, if I zoom in to that area above, and force it to query the layerView, the Feature Layer looks fine. I think when the initial query happens, the geometries are messed up, but get refreshed when zooming in.&amp;nbsp; &amp;nbsp;When those coloured features are added to the Feature Layer the map extent is rather zoomed out, is there a way to force the Feature Layer to redraw included Features?&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 22:01:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/streamlayerview-issue-cloning-feature-into-feature/m-p/1613014#M87116</guid>
      <dc:creator>AndrewMurdoch1</dc:creator>
      <dc:date>2025-05-08T22:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: StreamLayerView issue cloning feature into Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/streamlayerview-issue-cloning-feature-into-feature/m-p/1613044#M87117</link>
      <description>&lt;P&gt;That should not happen. Repro case would be useful in this case. Which version of the API are you using?&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 23:23:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/streamlayerview-issue-cloning-feature-into-feature/m-p/1613044#M87117</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2025-05-08T23:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: StreamLayerView issue cloning feature into Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/streamlayerview-issue-cloning-feature-into-feature/m-p/1613636#M87127</link>
      <description>&lt;P&gt;Please excuse the delay in response, I can't provide you with access to that data, I was checking if I could.&amp;nbsp; The to the issue was to run the following, when the view is stationary:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;this.featureLayer.applyEdits({
    addFeatures: &amp;lt;new features&amp;gt;,
    deleteFeatures: &amp;lt;current features&amp;gt;,
}).then(function (editResult) {
    console.log(editResult);
    r(null)
});&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Which removes all the current features on the map, and adds them again given the current extent, which causes them to render, resolving the issue.&amp;nbsp; I guess due to the fully zoomed out extent, the graphics are stored in the Layer View in a rough form, which is why during the query on the Layer View, and then throwing them into the Feature Layer caused the problem I was experiencing.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 14:09:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/streamlayerview-issue-cloning-feature-into-feature/m-p/1613636#M87127</guid>
      <dc:creator>AndrewMurdoch1</dc:creator>
      <dc:date>2025-05-12T14:09:06Z</dc:date>
    </item>
  </channel>
</rss>

