Get this error when adding layers to my AGOL web map:
What's causing such a problem?
I see this issue in web app builder applications. Does it come with symptoms like layers not loading or widgets that discontinue to function? I am mostly concerned because we use the editing widget quite a bit. I want to know how serious this would be we allow it to continue. We are 'stuck' in 10.9.1 Enterprise. New Map Viewer and Experience builder are not very functional. Web App builder/map viewer classic are really the only solutions for us. Thanks for looking.
Edit: looking back in the thread I see that it is described that layers may not load.
Hi,
In our application, we are utilizing approximately 8 feature layers through FeatureLayer.
We dynamically generate renderers based on definition expressions on these feature layers. However, we are encountering a serious WebGL error: "Too many active WebGL contexts. Oldest context will be lost." This error occurs when we rapidly zoom in/out and load the map based on the selected dropdown list (definition expressions). we dynamically apply definition expressions on feature layers.
As a result of this error, the map displays as blank, and all added layers are removed. It's worth noting that in the blank map, the search and zoom in/out controls are still visible, but the layers are not showing.
We would greatly appreciate any suggestions or guidance on how to resolve this issue.
Thank you.
The best I've been able to do so far with my map which has similar issues, is to adjust visibility of layers using webgl contexts (so feature layers and I think vector tile layers too) so that the map has less webgl contexts to load. I'm hoping that moving on to the new map editor will fix this, but have not been able to test it yet.
Hi @SaurabhUpadhyaya I see you have two recent questions that mention errors related to WebGL contexts. This most likely is related to your ArcGIS code and not an issue with React. Your best option is to provide a vanilla JS codepen using the ESM CDN: https://github.com/Esri/jsapi-resources/tree/main/esm-samples/jsapi-esm-cdn. That way we can all take a look and provide suggestions. Note, the ESM CDN is for testing and prototyping, only. It doesn't offer the performance of a locally built ESM app.