Good morning all,
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.
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.
On 4.16, I could feed it the following:
arcgis/rest/services/IN_AL/MapServer and it would loop through all the layers, and load them.
Group Layer (/MapServer/0)
--Layer (/MapServer/1)
--Layer (/MapServer/2)
Another Group Layer (/MapServer/3)
--Layer (/MapServer/4)
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.
As I am looping through them, they are being loaded like FeatureLayer({url: urltoLayerhere}.load().
Could anyone point me in the right direction?
Thanks in advance.