<?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: Create FeatureLayer from IdentifyResults in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/create-featurelayer-from-identifyresults/m-p/605764#M18054</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Robert for your response. Now I can create the FeatureLayer and add this to the map, but in the AttributeTable I can not see the Features, I attach a snapshot and the code, how can I see the Results in the Attribute Table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;IMG alt="Captura.PNG" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/58420_Captura.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;This is how I create the &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;array of the results feature:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var arrIdentify:Array = new Array(); 

&amp;nbsp; for each (var identifyResult:IdentifyResult in identifyResults){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arrIdentify.push(identifyResult.feature);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .
&amp;nbsp; }&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this is where I create the FeatureLayer:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; var sfr:ShapeFileResult = new ShapeFileResult();
&amp;nbsp; sfr.title = "Title";
&amp;nbsp; var sms:SimpleMarkerSymbol = new SimpleMarkerSymbol();
&amp;nbsp; sms.color = 0x0000FF;
&amp;nbsp; sms.style = SimpleMarkerSymbol.STYLE_CIRCLE;
&amp;nbsp; sms.size = 8;
&amp;nbsp; sfr.symbol = sms;
&amp;nbsp; sfr.extent = GraphicUtil.getGraphicsExtent(arrIdentify);
&amp;nbsp; sfr.content = "Length: "+arrIdentify.length;
&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; var featureSet:FeatureSet = new FeatureSet(arrIdentify);&amp;nbsp; 
&amp;nbsp; var layerDetails:LayerDetails = creatLayerDetails(sfr, map.spatialReference); //sfr is my custom shapefile result object&amp;nbsp; 
&amp;nbsp; var featureLayer:FeatureLayer = new FeatureLayer();&amp;nbsp; 
&amp;nbsp; featureLayer.spatialReference = map.spatialReference;&amp;nbsp; 
&amp;nbsp; featureLayer.name = "Identify Results";&amp;nbsp; 
&amp;nbsp; featureLayer.mode = FeatureLayer.MODE_ON_DEMAND;&amp;nbsp; 
&amp;nbsp; featureLayer.featureCollection = new FeatureCollection(featureSet, layerDetails);&amp;nbsp; 
&amp;nbsp; featureLayer.renderer = new SimpleRenderer(new PictureMarkerSymbol("assets/images/i_target.png",30,30,0,0,0));
&amp;nbsp; map.addLayer(featureLayer);&amp;nbsp; &lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The creatLayerDetails function is like yours.&lt;/P&gt;&lt;P&gt;I will appreciate your help again &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 01:58:05 GMT</pubDate>
    <dc:creator>ViridianaGómez_Olivera</dc:creator>
    <dc:date>2021-12-12T01:58:05Z</dc:date>
    <item>
      <title>Create FeatureLayer from IdentifyResults</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/create-featurelayer-from-identifyresults/m-p/605762#M18052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I want to make a FeatureLayer from IdentifyResults because I want to see the Results in the AttributeTable, like as mentioned in this thread, how can I do that?:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.esri.com/thread/88653#367162"&gt;https://community.esri.com/thread/88653#367162&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This have to do with the Dynamic Workspace?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3101"&gt;Robert Scheitlin, GISP&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really will appreciate your help, regards. &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2015 20:54:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/create-featurelayer-from-identifyresults/m-p/605762#M18052</guid>
      <dc:creator>ViridianaGómez_Olivera</dc:creator>
      <dc:date>2015-01-30T20:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Create FeatureLayer from IdentifyResults</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/create-featurelayer-from-identifyresults/m-p/605763#M18053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Viridiana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; So you will have to loop thought the identify results and make an array of the results feature (which is just a graphic), and then you can use some code like I have in my ShapeFile widget to create a new FeatureLayer using a FeatureCollection. Here is some snippets of code from my Shapefile widget that are the main parts of what you need to do. This code in not copy and paste ready for your application you will have to tailor it to you needs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;featureSet = new FeatureSet(graArr);
layerDetails = creatLayerDetails(sfr, map.spatialReference); //sfr is my custom shapefile result object
featureLayer = new FeatureLayer();
featureLayer.spatialReference = map.spatialReference;
featureLayer.name = "some name";
featureLayer.mode = FeatureLayer.MODE_ON_DEMAND;
featureLayer.featureCollection = new FeatureCollection(featureSet, layerDetails);
featureLayer.renderer = new SimpleRenderer(defaultSymbol);
map.addLayer(featureLayer);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function for making the LayerDetails:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private function creatLayerDetails(sfr:ShapeFileResult, spatialReference:SpatialReference, isLabel:Boolean = false):LayerDetails
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var layerDetails:LayerDetails = new LayerDetails();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerDetails = new LayerDetails();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerDetails.canModifyLayer = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerDetails.canScaleSymbols = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerDetails.copyright = "";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerDetails.defaultVisibility = true;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerDetails.extent = sfr.extent;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerDetails.hasAttachments = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerDetails.hasLabels = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerDetails.hasM = layerDetails.hasZ = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerDetails.isDataVersioned = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerDetails.spatialReference = spatialReference;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerDetails.version = Number.NaN;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerDetails.name = sfr.title;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var di:DrawingInfo = new DrawingInfo();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; di.alpha = 1;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; di.renderer = new SimpleRenderer(sfr.symbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerDetails.drawingInfo = di;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return layerDetails;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:58:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/create-featurelayer-from-identifyresults/m-p/605763#M18053</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T01:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Create FeatureLayer from IdentifyResults</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/create-featurelayer-from-identifyresults/m-p/605764#M18054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Robert for your response. Now I can create the FeatureLayer and add this to the map, but in the AttributeTable I can not see the Features, I attach a snapshot and the code, how can I see the Results in the Attribute Table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;IMG alt="Captura.PNG" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/58420_Captura.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;This is how I create the &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;array of the results feature:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var arrIdentify:Array = new Array(); 

&amp;nbsp; for each (var identifyResult:IdentifyResult in identifyResults){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arrIdentify.push(identifyResult.feature);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .
&amp;nbsp; }&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this is where I create the FeatureLayer:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; var sfr:ShapeFileResult = new ShapeFileResult();
&amp;nbsp; sfr.title = "Title";
&amp;nbsp; var sms:SimpleMarkerSymbol = new SimpleMarkerSymbol();
&amp;nbsp; sms.color = 0x0000FF;
&amp;nbsp; sms.style = SimpleMarkerSymbol.STYLE_CIRCLE;
&amp;nbsp; sms.size = 8;
&amp;nbsp; sfr.symbol = sms;
&amp;nbsp; sfr.extent = GraphicUtil.getGraphicsExtent(arrIdentify);
&amp;nbsp; sfr.content = "Length: "+arrIdentify.length;
&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; var featureSet:FeatureSet = new FeatureSet(arrIdentify);&amp;nbsp; 
&amp;nbsp; var layerDetails:LayerDetails = creatLayerDetails(sfr, map.spatialReference); //sfr is my custom shapefile result object&amp;nbsp; 
&amp;nbsp; var featureLayer:FeatureLayer = new FeatureLayer();&amp;nbsp; 
&amp;nbsp; featureLayer.spatialReference = map.spatialReference;&amp;nbsp; 
&amp;nbsp; featureLayer.name = "Identify Results";&amp;nbsp; 
&amp;nbsp; featureLayer.mode = FeatureLayer.MODE_ON_DEMAND;&amp;nbsp; 
&amp;nbsp; featureLayer.featureCollection = new FeatureCollection(featureSet, layerDetails);&amp;nbsp; 
&amp;nbsp; featureLayer.renderer = new SimpleRenderer(new PictureMarkerSymbol("assets/images/i_target.png",30,30,0,0,0));
&amp;nbsp; map.addLayer(featureLayer);&amp;nbsp; &lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The creatLayerDetails function is like yours.&lt;/P&gt;&lt;P&gt;I will appreciate your help again &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:58:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/create-featurelayer-from-identifyresults/m-p/605764#M18054</guid>
      <dc:creator>ViridianaGómez_Olivera</dc:creator>
      <dc:date>2021-12-12T01:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Create FeatureLayer from IdentifyResults</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/create-featurelayer-from-identifyresults/m-p/605765#M18055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Viridiana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; As I mention in my last post the code snippet was not copy and paste ready. Unless you have created a ShapeFileResult object on your end then you have some issue with the code you are attempting to use.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 23:44:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/create-featurelayer-from-identifyresults/m-p/605765#M18055</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-02-03T23:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: Create FeatureLayer from IdentifyResults</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/create-featurelayer-from-identifyresults/m-p/605766#M18056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert, thank you for your response again. I have created a ShapeFileResult object, so I will keep searching the error. Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2015 15:31:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/create-featurelayer-from-identifyresults/m-p/605766#M18056</guid>
      <dc:creator>ViridianaGómez_Olivera</dc:creator>
      <dc:date>2015-02-04T15:31:14Z</dc:date>
    </item>
  </channel>
</rss>

