<?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: 4.16 &amp;gt; 4.21 Upgrade Questions in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-16-gt-4-21-upgrade-questions/m-p/1136226#M76039</link>
    <description>&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#load" target="_self"&gt;FeatureLayer.load()&lt;/A&gt; is a Promise in recent versions - are you definitely using it as a Promise?&lt;/P&gt;&lt;P&gt;Can you a Catch and see if it is silently throwing any errors?&lt;/P&gt;</description>
    <pubDate>Sun, 23 Jan 2022 20:18:00 GMT</pubDate>
    <dc:creator>Stacy-Rendall</dc:creator>
    <dc:date>2022-01-23T20:18:00Z</dc:date>
    <item>
      <title>4.16 &gt; 4.21 Upgrade Questions</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-16-gt-4-21-upgrade-questions/m-p/1135814#M76030</link>
      <description>&lt;P&gt;Good morning all,&lt;/P&gt;&lt;P&gt;I recently inherited an React app using ArcGIS JS API 4.16. The app is also using webpack, and as most of you probably know, it wasn't until shortly after 4.16 that webpack played nice with the API. For this reason, I decided to try and tackle the upgrade to 4.21.&lt;/P&gt;&lt;P&gt;I believe everything is mostly working, but I've encountered one bug I can't quite figure out. The application has some functionality where you can give it a URL, top level or child, and it will load the layers.&lt;/P&gt;&lt;P&gt;On 4.16, I could feed it the following:&lt;/P&gt;&lt;P&gt;arcgis/rest/services/IN_AL/MapServer and it would loop through all the layers, and load them.&lt;/P&gt;&lt;P&gt;Group Layer (/MapServer/0)&lt;BR /&gt;--Layer&amp;nbsp;(/MapServer/1)&lt;BR /&gt;--Layer (/MapServer/2)&lt;BR /&gt;Another Group Layer (/MapServer/3)&lt;BR /&gt;--Layer (/MapServer/4)&lt;/P&gt;&lt;P&gt;This involved .load()ing each layer. It looks like something changed between 4.16 and 4.21 that I can't pinpoint in any of the change logs that is failing when I .load() the GroupLayer.&lt;/P&gt;&lt;P&gt;As I am looping through them, they are being loaded like FeatureLayer({url: urltoLayerhere}.load().&lt;/P&gt;&lt;P&gt;Could anyone point me in the right direction?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 14:45:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-16-gt-4-21-upgrade-questions/m-p/1135814#M76030</guid>
      <dc:creator>joshk6656</dc:creator>
      <dc:date>2022-01-21T14:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: 4.16 &gt; 4.21 Upgrade Questions</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-16-gt-4-21-upgrade-questions/m-p/1135911#M76032</link>
      <description>&lt;P&gt;Are you getting an error message anywhere that would help troubleshoot the issue?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 17:52:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-16-gt-4-21-upgrade-questions/m-p/1135911#M76032</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2022-01-21T17:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: 4.16 &gt; 4.21 Upgrade Questions</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-16-gt-4-21-upgrade-questions/m-p/1136226#M76039</link>
      <description>&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#load" target="_self"&gt;FeatureLayer.load()&lt;/A&gt; is a Promise in recent versions - are you definitely using it as a Promise?&lt;/P&gt;&lt;P&gt;Can you a Catch and see if it is silently throwing any errors?&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jan 2022 20:18:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-16-gt-4-21-upgrade-questions/m-p/1136226#M76039</guid>
      <dc:creator>Stacy-Rendall</dc:creator>
      <dc:date>2022-01-23T20:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: 4.16 &gt; 4.21 Upgrade Questions</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-16-gt-4-21-upgrade-questions/m-p/1136371#M76047</link>
      <description>&lt;P&gt;I'm not sure why I did not include the error.&lt;/P&gt;&lt;P&gt;"feature-layer-source:unsupported-type","feature-layer-source:unsupported-type"&lt;/P&gt;&lt;P&gt;This is happening on this:&lt;/P&gt;&lt;P&gt;FeatureLayer({url: urltoLayerhere(which is a GroupLayer)}.load()&lt;/P&gt;&lt;P&gt;The issue is if url is a GroupLayer, it fails.&lt;/P&gt;&lt;P&gt;The code is taking a MapImageLayer, then looping through the sublayers, and trying to load them all as FeatureLayers to get their capabilities.&lt;/P&gt;&lt;P&gt;I guess this was allowed in 4.16, but now you cannot load a GroupLayer as a FeatureLayer?&lt;/P&gt;&lt;P&gt;Would there be a way to filter out the GroupLayers after loading the MapImageLayer? I see it in the object, but I don't think its accessible.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 14:14:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-16-gt-4-21-upgrade-questions/m-p/1136371#M76047</guid>
      <dc:creator>joshk6656</dc:creator>
      <dc:date>2022-01-24T14:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: 4.16 &gt; 4.21 Upgrade Questions</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-16-gt-4-21-upgrade-questions/m-p/1136530#M76057</link>
      <description>&lt;P&gt;Ah... I haven't done a lot with sublayers, but what I did do was with something &amp;gt; 4.16, it all seemed pretty straight forward.&lt;/P&gt;&lt;P&gt;I'd recommend taking a good read of the docs for &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html" target="_self"&gt;MapImageLayer&lt;/A&gt; and &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html" target="_self"&gt;SubLayer&lt;/A&gt;, as you should be able to do what you want in a more standard way. Note you can also &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#createFeatureLayer" target="_self"&gt;create a feature layer from a SubLayer&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 19:00:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/4-16-gt-4-21-upgrade-questions/m-p/1136530#M76057</guid>
      <dc:creator>Stacy-Rendall</dc:creator>
      <dc:date>2022-01-24T19:00:10Z</dc:date>
    </item>
  </channel>
</rss>

