<?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 Clone a FeatureLayer object in Arcgis 3.31 for javascript? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-a-featurelayer-object-in-arcgis-3-31-for/m-p/552938#M51568</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The java api has a method to copy a FeatureLayer: &lt;A class="link-titled" href="https://developers.arcgis.com/java/latest/api-reference/reference/com/esri/arcgisruntime/layers/FeatureLayer.html" title="https://developers.arcgis.com/java/latest/api-reference/reference/com/esri/arcgisruntime/layers/FeatureLayer.html"&gt;FeatureLayer (ArcGIS Runtime SDK for Java 100.7.0)&lt;/A&gt; , but I can't find a similar method here: &lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jsapi/featurelayer.html" title="https://developers.arcgis.com/javascript/3/jsapi/featurelayer.html"&gt;FeatureLayer (legacy) | API Reference | ArcGIS API for JavaScript 3.31&lt;/A&gt; . How do I clone a FeatureLayer in Arcgis 3.31 for javascript?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Jan 2020 20:43:05 GMT</pubDate>
    <dc:creator>Phares_Andrew</dc:creator>
    <dc:date>2020-01-31T20:43:05Z</dc:date>
    <item>
      <title>Clone a FeatureLayer object in Arcgis 3.31 for javascript?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-a-featurelayer-object-in-arcgis-3-31-for/m-p/552938#M51568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The java api has a method to copy a FeatureLayer: &lt;A class="link-titled" href="https://developers.arcgis.com/java/latest/api-reference/reference/com/esri/arcgisruntime/layers/FeatureLayer.html" title="https://developers.arcgis.com/java/latest/api-reference/reference/com/esri/arcgisruntime/layers/FeatureLayer.html"&gt;FeatureLayer (ArcGIS Runtime SDK for Java 100.7.0)&lt;/A&gt; , but I can't find a similar method here: &lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jsapi/featurelayer.html" title="https://developers.arcgis.com/javascript/3/jsapi/featurelayer.html"&gt;FeatureLayer (legacy) | API Reference | ArcGIS API for JavaScript 3.31&lt;/A&gt; . How do I clone a FeatureLayer in Arcgis 3.31 for javascript?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2020 20:43:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-a-featurelayer-object-in-arcgis-3-31-for/m-p/552938#M51568</guid>
      <dc:creator>Phares_Andrew</dc:creator>
      <dc:date>2020-01-31T20:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: Clone a FeatureLayer object in Arcgis 3.31 for javascript?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-a-featurelayer-object-in-arcgis-3-31-for/m-p/552939#M51569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no such method on&amp;nbsp;the clinetside JS API.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2020 21:22:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-a-featurelayer-object-in-arcgis-3-31-for/m-p/552939#M51569</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-01-31T21:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Clone a FeatureLayer object in Arcgis 3.31 for javascript?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-a-featurelayer-object-in-arcgis-3-31-for/m-p/552940#M51570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure the reason you want to copy a feature layer, you can try it in&amp;nbsp;the&amp;nbsp;JavaScript way:&lt;/P&gt;&lt;PRE class="" style="color: #393318; background-color: #eff0f1; border: 0px; margin: 0px 0px 1em; padding: 12px 8px;"&gt;&lt;CODE style="background-color: #eff0f1; border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;var copiedFeatureLayer = JSON&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;parse&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;JSON&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;stringify&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;objFeatureLayer&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;))&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or&lt;/P&gt;&lt;PRE class="" style="color: #393318; background-color: #eff0f1; border: 0px; margin: 0px 0px 1em; padding: 12px 8px;"&gt;&lt;CODE style="background-color: #eff0f1; border: 0px; font-weight: inherit;"&gt;&lt;CODE style="background-color: #eff0f1; border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;var &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/CODE&gt;&lt;CODE style="background-color: #eff0f1; border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;copiedFeatureLayer = Object.assign({}, objFeatureLayer)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;CODE class="" style="color: #333333; background: 0px 0px transparent; border: 0px; font-weight: inherit; font-size: 1em;"&gt;&lt;SPAN class="" style="color: #0077aa; border: 0px;"&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2020 05:37:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-a-featurelayer-object-in-arcgis-3-31-for/m-p/552940#M51570</guid>
      <dc:creator>LeoLiu1</dc:creator>
      <dc:date>2020-02-04T05:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Clone a FeatureLayer object in Arcgis 3.31 for javascript?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-a-featurelayer-object-in-arcgis-3-31-for/m-p/552941#M51571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've tried cloning via the last method, but this.inherited(arguments) is undefined for the feature layer (and I'm not sure what I need to add to the copied feature layer to avoid this).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason I'm is that whenever I call 'featureLayer.clearSelection' or make a new selection on the layer with selectFeatures, the layer deletes the selected objects (instead of just clearing the selection). My solution to this was to try and restore a cloned copy of the layer after every new selection / clear.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2020 19:45:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-a-featurelayer-object-in-arcgis-3-31-for/m-p/552941#M51571</guid>
      <dc:creator>Phares_Andrew</dc:creator>
      <dc:date>2020-02-04T19:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: Clone a FeatureLayer object in Arcgis 3.31 for javascript?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-a-featurelayer-object-in-arcgis-3-31-for/m-p/552942#M51572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you share a piece of your codes? Wondering you probably just need to keep a copy of the selected features. It's an array of Graphics.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2020 00:07:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-a-featurelayer-object-in-arcgis-3-31-for/m-p/552942#M51572</guid>
      <dc:creator>LeoLiu1</dc:creator>
      <dc:date>2020-02-05T00:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Clone a FeatureLayer object in Arcgis 3.31 for javascript?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-a-featurelayer-object-in-arcgis-3-31-for/m-p/552943#M51573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That solved my issue – thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2020 20:56:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-a-featurelayer-object-in-arcgis-3-31-for/m-p/552943#M51573</guid>
      <dc:creator>Phares_Andrew</dc:creator>
      <dc:date>2020-02-07T20:56:11Z</dc:date>
    </item>
  </channel>
</rss>

