Skip to content

GPUInitializationError

Defined in: util/gpu_initialization_error.ts:10

Thrown by the Map constructor when a GPU rendering context cannot be created, or fired via the map's error event when recreating the context after a webglcontextrestored fails.

Carries the canvas attributes that were requested and, when the browser provided one, the originating webglcontextcreationerror statusMessage. Consumers can branch on instanceof GPUInitializationError and inspect the cause programmatically.

See

https://wiki.openstreetmap.org/wiki/This_map_requires_WebGL

Extends

  • Error