Select to view content in your preferred language

LiyerList widget - bug introduced at version 4.18 - Angular

1234
5
02-08-2021 09:33 AM
RichardMoussopo
Frequent Contributor

I recently upgraded my application from version 4.17 to 4.18 and came to realize that the LayerList widget still works but throws now the following error: "view: no layerview has been found for the layer"

RichardMoussopo_0-1612805013562.png

I tried to reproduce this error using the sample from ESRI https://developers.arcgis.com/javascript/latest/sample-code/widgets-layerlist/  and replace the map layers with my own layers: there was no error

Then I recreated a sample app with angular and I was able to reproduce this error again. This error seems to happen in an Angular project using esri-loader and @types/arcgis-js-api 

I ended up reverting back my application to version 4.17

 

 

Tags (1)
0 Kudos
5 Replies
RichardMoussopo
Frequent Contributor

it turns out the issue is on the esri-loader v3.0.0. I ended up reinstalling js API 

"@types/arcgis-js-api""^4.18.0", but downgraded the esri-loader to 
"esri-loader""^2.15.0", and this seems to fix the issue
0 Kudos
AndyGup
Esri Regular Contributor

Are you able to share a stackblitz example? I'm not able to reproduce this with esri-loader 3.0.0 and Angular 11: https://stackblitz.com/edit/angular11-arcgis-layerlist?file=src/app/esri-map/esri-map.component.ts.

 

[Edited] P.S. forgot to add that my example StackBlitz is working with "@types/arcgis-js-api""^4.18.0"

0 Kudos
RichardMoussopo
Frequent Contributor

https://angular-ivy-zharup.stackblitz.io 

Hi Andy, thank you for the quick response. Above is the stackblitz sample that reproduces the error: Angular 11, "@types/arcgis-js-api": "^4.18.0"  and "esri-loader": "^3.0.0"

0 Kudos
AndyGup
Esri Regular Contributor

Thanks Richard. Those errors might be related to another issue we are working on. I'll make a note to take another look at this once we have a new /next build to test with a potential fix.

0 Kudos