<?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: QueryTask Result to a Feature Layer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-result-to-a-feature-layer/m-p/4431#M429</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That did it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;layer = new FeatureLayer({&lt;BR /&gt; spatialReference: { wkid: 4326 },&lt;BR /&gt; source: response.features, // autocast as an array of esri/Graphic&lt;BR /&gt;fields: bluefields,&amp;nbsp;&lt;BR /&gt; renderer: blueRenderer,&lt;BR /&gt; geometryType: "polygon",&lt;BR /&gt; objectIdField: "ObjectID"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;map.add(layer)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Oct 2018 18:11:14 GMT</pubDate>
    <dc:creator>DavidKucharski</dc:creator>
    <dc:date>2018-10-15T18:11:14Z</dc:date>
    <item>
      <title>QueryTask Result to a Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-result-to-a-feature-layer/m-p/4429#M427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to use the FeatureSet results, from a QueryTask, as the Source of a Feature Layer. No matter how I am doing it, I cannot seem to get the Feature Layer loaded. Please see my logic below and let me know what I am doing wrong.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;var qTask = new QueryTask({&lt;BR /&gt; url: zipCodeUrl&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;var params = new Query({&lt;BR /&gt; returnGeometry: true,&lt;BR /&gt; outFields: ["*"]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.&amp;nbsp;params.where = "ID_ IN (" + blue.value + ")";&lt;BR /&gt; qTask.execute(params)&lt;BR /&gt; .then(getBlueResults)&lt;BR /&gt; .catch(promiseRejected);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.&amp;nbsp;&lt;/P&gt;&lt;P&gt;function getBlueResults(response) {&lt;/P&gt;&lt;P&gt;layer = new FeatureLayer({&lt;BR /&gt;&amp;nbsp;source: response.features, // autocast as an array of esri/Graphic&lt;BR /&gt; // // create an instance of esri/layers/support/Field for each field object&lt;BR /&gt;&amp;nbsp;fields: bluefields, // This is required when creating a layer from Graphics&lt;BR /&gt;&amp;nbsp;objectIdField: "ObjectID"&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;map.add(layer);&lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2018 17:02:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-result-to-a-feature-layer/m-p/4429#M427</guid>
      <dc:creator>DavidKucharski</dc:creator>
      <dc:date>2018-10-15T17:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: QueryTask Result to a Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-result-to-a-feature-layer/m-p/4430#M428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;David,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;You are missing the required geometryType property (when using source). Do you see any errors in the browsers web console?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2018 17:35:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-result-to-a-feature-layer/m-p/4430#M428</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-10-15T17:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: QueryTask Result to a Feature Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-result-to-a-feature-layer/m-p/4431#M429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That did it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;layer = new FeatureLayer({&lt;BR /&gt; spatialReference: { wkid: 4326 },&lt;BR /&gt; source: response.features, // autocast as an array of esri/Graphic&lt;BR /&gt;fields: bluefields,&amp;nbsp;&lt;BR /&gt; renderer: blueRenderer,&lt;BR /&gt; geometryType: "polygon",&lt;BR /&gt; objectIdField: "ObjectID"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;map.add(layer)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2018 18:11:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-result-to-a-feature-layer/m-p/4431#M429</guid>
      <dc:creator>DavidKucharski</dc:creator>
      <dc:date>2018-10-15T18:11:14Z</dc:date>
    </item>
  </channel>
</rss>

