Browser limitation
Browser limitation
The MapView component uses WebGL for rendering. Browsers impose implementation-dependent limits on simultaneous WebGL contexts. Opening many maps or browser tabs can exceed the available limit, causing the browser to revoke a context. This is known as a WebGL context loss.
When a context loss occurs, the MapView automatically detects it and replaces the map with a built-in fallback state that informs the user and offers a Refresh button to re-attempt rendering. The same fallback state is shown when the map keeps failing to render. Unlike the loading and error states, this fallback is not customizable, except that a custom <ErrorState /> replaces it after repeated rendering errors. To react to the loss, for example for analytics, use the onContextLostError prop.
Select Simulate WebGL context loss in the example below to see how the component behaves when the context is lost: