iOS map stops drawing - "Too many active WebGL contexts" despite .remove() #5585
Labels
needs investigation 🔍
Issues that require further research (e.g. it's not clear whether it's GL JS or something else)
I have a single page application which has one main map, and also frequently displays new pages with smaller maps on them. When I close these pages, I call .remove() against these smaller maps.
When using iOS Safari or iOS chrome (iPhone SE), after ~15 new pages are opened, the main map no longer renders. I'm quite sure this is related to #2656 "Too many active WebGL contexts." The same behavior happens on desktop Chrome if you neglect to call "remove()".
See example here: https://jsfiddle.net/bill3000/mpLkqcdz/1/
mapbox-gl-js version v0.41.0:
Steps to Trigger Behavior
Expected Behavior
First map always renders
Actual Behavior
First map ceases to render
I've read #2656, but I'm curious if there aren't orthogonal solutions. Can you use the same WebGL context across all maps? Can you "detach" and "reattach" a map from the DOM to reuse a WebGL context?
The text was updated successfully, but these errors were encountered: