<?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: copy feature in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-feature/m-p/1071580#M73602</link>
    <description>&lt;P&gt;Change the query used for queryFeatures to only fetch the features you are interested in.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Jun 2021 17:01:12 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2021-06-23T17:01:12Z</dc:date>
    <item>
      <title>copy feature</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-feature/m-p/1071054#M73582</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have couple of layers one is "master" layer another one is "temporary" layer. Both layer have same fields.&lt;/P&gt;&lt;P&gt;User will create new feature in "temporary" layer , once approved the specific feature need to move to "master" layer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need know the how to copy the feature from temporary layer to master layer.&lt;/P&gt;&lt;P&gt;Please help me if someone have idea.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 16:19:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-feature/m-p/1071054#M73582</guid>
      <dc:creator>JayakumarKamalakannan</dc:creator>
      <dc:date>2021-06-22T16:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: copy feature</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-feature/m-p/1071082#M73583</link>
      <description>&lt;P&gt;I did something like in &lt;A href="https://odoe.net/blog/edit-sessions" target="_self"&gt;this blog post&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Here is a &lt;A href="https://codepen.io/odoe/pen/QWGRJNg" target="_self"&gt;codepen&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;It's something like this.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function copyLayer(lyr, title) {
    const tempLayer = new FeatureLayer({
        title,
        fields: lyr.fields.map(x =&amp;gt; x.clone()),
        geometryType: lyr.geometryType,
        renderer: lyr.renderer.clone(),
        spatialReference: lyr.spatialReference.clone(),
        source: [],
        visible: false
    });
    return tempLayer;
}

// later, might need a where: 1=1 query
const { features } = await soureLayer.queryFeatures();
const result = await localLayer.applyEdits({
    addFeatures: features
})
.catch(err =&amp;gt; console.log(error));
localLayer.refresh();&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 22 Jun 2021 17:07:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-feature/m-p/1071082#M73583</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-06-22T17:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: copy feature</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-feature/m-p/1071310#M73594</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for the reply. Sample code seems to be copy entire feature from temp layer to master layer. I need to copy only few features not entire feature. Kindly let me know how to do it?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 01:49:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-feature/m-p/1071310#M73594</guid>
      <dc:creator>JayakumarKamalakannan</dc:creator>
      <dc:date>2021-06-23T01:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: copy feature</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-feature/m-p/1071580#M73602</link>
      <description>&lt;P&gt;Change the query used for queryFeatures to only fetch the features you are interested in.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 17:01:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/copy-feature/m-p/1071580#M73602</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-06-23T17:01:12Z</dc:date>
    </item>
  </channel>
</rss>

