<?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: FeatureLayer Promise Doesn't Resolve in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-promise-doesn-t-resolve/m-p/339104#M31415</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jared,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at your code, you are not adding the featureLayer to the view so it is the developer's responsibility to load the layer. Please take a look at the doc for the FeatureLayer.load():&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://jscore.esri.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#load" title="https://jscore.esri.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#load"&gt;https://jscore.esri.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#load&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fl.load().then(function(){&lt;BR /&gt;&amp;nbsp;console.log("layer loaded");&lt;BR /&gt;});&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;-Undral&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Dec 2017 18:44:04 GMT</pubDate>
    <dc:creator>UndralBatsukh</dc:creator>
    <dc:date>2017-12-12T18:44:04Z</dc:date>
    <item>
      <title>FeatureLayer Promise Doesn't Resolve</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-promise-doesn-t-resolve/m-p/339103#M31414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm creating FeatureLayer objects from SubLayer objects in order to use them as sources in a Search widget. One of the FeatureLayer objects seems to work properly as a source while the other two don't. I originally added them as sources without using the &lt;STRONG&gt;then method callback&lt;/STRONG&gt; on the FeatureLayer objects. I then tried adding them within the&amp;nbsp;&lt;STRONG&gt;then method&lt;/STRONG&gt;&amp;nbsp;&lt;STRONG&gt;callback&lt;/STRONG&gt; and none of them got added because the Promises never resolved. I then wrote some test code with a completely different MapServer and the same thing happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/390589_pastedImage_5.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know why the FeatureLayer Promise isn't resolving?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 17:56:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-promise-doesn-t-resolve/m-p/339103#M31414</guid>
      <dc:creator>JaredGasco</dc:creator>
      <dc:date>2017-12-12T17:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer Promise Doesn't Resolve</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-promise-doesn-t-resolve/m-p/339104#M31415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jared,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at your code, you are not adding the featureLayer to the view so it is the developer's responsibility to load the layer. Please take a look at the doc for the FeatureLayer.load():&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://jscore.esri.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#load" title="https://jscore.esri.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#load"&gt;https://jscore.esri.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#load&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fl.load().then(function(){&lt;BR /&gt;&amp;nbsp;console.log("layer loaded");&lt;BR /&gt;});&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;-Undral&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 18:44:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-promise-doesn-t-resolve/m-p/339104#M31415</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2017-12-12T18:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer Promise Doesn't Resolve</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-promise-doesn-t-resolve/m-p/339105#M31416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Feature Layer won't&amp;nbsp;attempt to load unless you add it to the map or manually load it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So try returning new FeatureLayer({ ... }).load(), or add the Feature Layer to your map before returning it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should note, I'm not sure if a sublayer in a MapImageLayer can be a FeatureLayer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 18:58:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-promise-doesn-t-resolve/m-p/339105#M31416</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2017-12-12T18:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer Promise Doesn't Resolve</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-promise-doesn-t-resolve/m-p/339106#M31417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;I should note, I'm not sure if a sublayer in a MapImageLayer can be a FeatureLayer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use any feature service or map service endpoint as a data source for feature layer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 19:36:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-promise-doesn-t-resolve/m-p/339106#M31417</guid>
      <dc:creator>KristianEkenes</dc:creator>
      <dc:date>2017-12-12T19:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer Promise Doesn't Resolve</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-promise-doesn-t-resolve/m-p/339107#M31418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everyone. Invoking the load method before the then method solved my issues.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 20:09:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-promise-doesn-t-resolve/m-p/339107#M31418</guid>
      <dc:creator>JaredGasco</dc:creator>
      <dc:date>2017-12-12T20:09:40Z</dc:date>
    </item>
  </channel>
</rss>

