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.
Hi @SaurabhUpadhyaya ! It's hard to tell what might be going on without looking at the code. Are you able to reproduce the issue in a simple isolated app and share it in a codepen or something similar?
Some general info: this kind of error might appear if you are creating multiple MapViews or SceneViews. And sometimes this can happen accidentally when using a framework like React, where it's possible for the view to get recreated in an effect/signal. Is any of that relevant to your use case?
Hi,
I am working on react application, where we have 2 mapviews (ArcGIS JS API 4.29) for side by side compare data to verify the changes.
Case:
In Left Map data is already loaded, and for right map loading the data on selection of dropdown list and initial 5-6 selection and applying on map, it is working perfect after that some times left map went blank(loaded layers not displaying) and sometimes rightmap went blank.. even i am loading data only on right side map.
When i check on console its shows the warning
Can anyone share to resolve this issue.
Please provide a github repo, stackblitz, or codesandbox that reproduces this issue. As Sam pointed out, no way to pinpoint the problem without it.
Hi friend's,
can you please share some work around to resolve this issue.
This is happening to me too.
Hey! We'd love to get this cleared up. There's not much we can do without a repro, but another piece of information that could be helpful is if this behavior only started after upgrading the version of the SDK you use. Did anyone experience something like that? Alternatively, is the issue still present in older versions of the SDK, like 4.28?