<?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: Clone features from getSelectedFeatures() method in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-features-from-getselectedfeatures-method/m-p/615016#M57509</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much !&lt;/P&gt;&lt;P&gt;It works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had already seen this method (toJson) but I had badly implemented.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Aug 2016 14:23:34 GMT</pubDate>
    <dc:creator>clementinechasles</dc:creator>
    <dc:date>2016-08-04T14:23:34Z</dc:date>
    <item>
      <title>Clone features from getSelectedFeatures() method</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-features-from-getselectedfeatures-method/m-p/615013#M57506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to clone in a new array (a deep copy without references) the features I have selected from a feature layer with the&lt;STRONG&gt; getSelectedFeatures()&lt;/STRONG&gt; method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to use&lt;STRONG&gt; lang.clone&lt;/STRONG&gt; from &lt;STRONG&gt;dojo&lt;/STRONG&gt; but it doesn't work. I have this error : "&lt;STRONG&gt;TypeError: this._url is null&lt;/STRONG&gt;".&lt;/P&gt;&lt;P&gt;I understand it cames from the feature layer. But I don't know how to fix this error or even if it's possible to do what I want to do by this way. I'm quite new with JSAPI.&lt;/P&gt;&lt;P&gt;I already used&lt;STRONG&gt; lang.clone&lt;/STRONG&gt; with &lt;STRONG&gt;polygons&lt;/STRONG&gt; from &lt;STRONG&gt;serviceAreaSolveResult&lt;/STRONG&gt; and it worked very well !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone help me on this problem ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemini.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2016 13:35:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-features-from-getselectedfeatures-method/m-p/615013#M57506</guid>
      <dc:creator>clementinechasles</dc:creator>
      <dc:date>2016-08-04T13:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Clone features from getSelectedFeatures() method</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-features-from-getselectedfeatures-method/m-p/615014#M57507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could do a for loop on your getSelectedFeatures and then use push to get them into a new array?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2016 13:44:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-features-from-getselectedfeatures-method/m-p/615014#M57507</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2016-08-04T13:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Clone features from getSelectedFeatures() method</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-features-from-getselectedfeatures-method/m-p/615015#M57508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cloning Graphic objects may not be a good idea. especially if it is already added to the map. GraphicsLayer to which it has been added will be one of the properties of the graphic object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best thing to do is to convert it to json and create a new graphic from that json.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var jsonGraphic = graphic.toJson();&lt;/P&gt;&lt;P&gt;var newGraphic = new Graphic(jsonGraphic);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2016 13:46:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-features-from-getselectedfeatures-method/m-p/615015#M57508</guid>
      <dc:creator>thejuskambi</dc:creator>
      <dc:date>2016-08-04T13:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Clone features from getSelectedFeatures() method</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-features-from-getselectedfeatures-method/m-p/615016#M57509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much !&lt;/P&gt;&lt;P&gt;It works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had already seen this method (toJson) but I had badly implemented.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2016 14:23:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-features-from-getselectedfeatures-method/m-p/615016#M57509</guid>
      <dc:creator>clementinechasles</dc:creator>
      <dc:date>2016-08-04T14:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Clone features from getSelectedFeatures() method</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-features-from-getselectedfeatures-method/m-p/615017#M57510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad I could help, Please mark the question as answered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2016 14:29:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clone-features-from-getselectedfeatures-method/m-p/615017#M57510</guid>
      <dc:creator>thejuskambi</dc:creator>
      <dc:date>2016-08-04T14:29:06Z</dc:date>
    </item>
  </channel>
</rss>

