# What changed in maplibre-gl

> 345 changes in maplibre-gl 5 to 6 from its official release notes, upgrade guides and advisories: 20 breaking, 4 deprecations, 3 security, 62 new APIs and options. Each one cited. Sources checked 2026-10-17. HTML: https://unstale.sh/npm/maplibre-gl/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## maplibre-gl 6

### Breaking changes

- Paint, light, and sky properties that read global-state now transition from their previous value when the state changes instead of snapping to the new value. (6.11.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.0)
- The Map constructor throws GPUInitializationError if a WebGL2 context cannot be created, instead of firing an uncaught error event and returning a partially constructed map. (6.7.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.7.0)
- Event names passed to map.on, once, and listens are now typed, producing TypeScript errors for unknown events and improving autocomplete; custom events can still use the documented type escape hatch. (6.3.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.3.0)
- The TypeScript target is now ES2022; consumers targeting older browsers or using older tooling may need to transpile MapLibre or update. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- Nested GeoJSON objects are supported, with object properties now encoded using __$json__ before their values. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- The method no longer returns this, so callers cannot rely on chaining its return value. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- Removes the second waitForCompletion parameter. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- Icon scaling with offset is disabled, changing rendering for affected icons. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- Encountering legacy expressions now throws an error with warning severity instead of silently failing. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- The internal transform property was removed; use Map's public API instead. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- Renames the Map box-zoom handler event class from MapLibreZoomEvent to MapBoxZoomEvent. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- Removed MapDataEvent; data events now use MapSourceDataEvent or MapStyleDataEvent, and source data events carry full source information. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- The distribution is ESM-only; UMD bundles are no longer published, so script-tag consumers must use a module script and default-import consumers must use namespace or named imports. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- Shader code that relied on the former #pragma mapbox must use #pragma maplibre. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- This event is notify-only; it no longer allows supplying an image through the event callback. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- WebGL v1 support has been removed and WebGL2 is required. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- The default changed to 4, which can affect queryRenderedFeatures results and polygon center label rendering; set it to undefined to revert. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)

### Security

- Sanitizes attribution using an allow list of tags and attributes instead of a list of known-dangerous ones. (6.11.1) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.1)
- Fixes DOM sanitization for iframe and srcdoc. (6.9.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.0)
- MapLibre GL JS: XSS Sanitizer Bypass in DOM.sanitize() via Live NamedNodeMap Removal Skip (6.4.1) — [security advisory](https://github.com/advisories/GHSA-JRC7-96C5-Q579), [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.4.1)

### Deprecations

- This file is now empty, remains to keep existing copy steps from failing, and is deprecated for removal in the next major version. (6.13.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.13.0)
- This file is now empty, remains to keep existing copy steps from failing, and is deprecated for removal in the next major version. (6.13.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.13.0)
- Deprecated because Arabic and Hebrew labels now render correctly without loading a right-to-left text plugin. (6.9.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.0)
- Deprecated because Arabic and Hebrew labels now render correctly without loading a right-to-left text plugin. (6.9.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.0)

### New APIs and options

- Pass globalState to new Map or setStyle to provide initial global state for the map style, overriding the style defaults. (6.14.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.14.0)
- An experimental custom-layer API lets layers drape what they draw over terrain and place objects on it on the GPU. (6.13.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.13.0)
- An experimental custom-layer API is available for custom layers that drape drawings over terrain and place objects on it on the GPU. (6.13.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.13.0)
- The prerender options include experimental renderTerrainHeightMap support for custom layers that drape drawings over terrain and place objects on it on the GPU. (6.13.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.13.0)
- When set, walls of a rounded corner share a vertex normal at shallow angles, shading the corner as one curved surface rather than shading each arc segment flat. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- Adds absolutePadding to treat padding as the map's persistent padding instead of adding it to the current padding. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- Adds absolutePadding to treat padding as the map's persistent padding instead of adding it to the current padding. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- Adds an option to GeolocateControlOptions to control map zoom adjustments in line with Geolocation Position update accuracy while trackUserLocation is true. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- Calculates camera options that place a geographic anchor at a screen position without moving the map. (6.11.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.0)
- Supports SDF rendering for fill patterns, using fill-color as the foreground color. (6.8.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.8.0)
- Returns the URL the style was loaded from, or null when the style was given as an object. (6.8.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.8.0)
- Styles can use the font-faces property, improving complex-script language rendering. (6.7.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.7.0)
- Adds a map method for getting font faces, supporting complex-script language rendering. (6.7.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.7.0)
- Adds a map method for setting font faces, supporting complex-script language rendering. (6.7.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.7.0)
- Adds Style#triggerSymbolPlacement to re-place symbols after movement that the map cannot detect itself. (6.7.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.7.0)
- An image source can be added without a URL; it starts empty and makes no network request, and can later display an image through updateImage. (6.7.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.7.0)
- Adds a layout property selecting whether the height offset is measured from the terrain surface or the zero elevation datum. (6.6.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.6.0)
- Adds a layout property that raises icons and text above the map. (6.6.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.6.0)
- Adds an experimental method for working with the selected image warp, with auto, perspective, and flat choices. (6.5.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.5.0)
- Adds an experimental method to choose an image warp of auto, perspective, or flat. (6.5.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.5.0)
- StyleImageInterface data can provide a renderWithWebGL callback to render style images on the GPU, improving performance for frequently changing images. (6.3.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.3.0)
- Adds a layout property that replaces fill-extrusion corners with arcs; its distance is clamped to 20% of each adjacent edge, near-straight corners are untouched, and the default of 0 keeps corners sharp. (6.2.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.2.0)
- Gets a source's current cluster options: `cluster`, `clusterMaxZoom` and `clusterRadius`. (6.1.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.1.0)
- Expressions are now supported in `sky.*`, `light.*` and `projection.type` properties. (6.1.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.1.0)
- Accepts an already-decoded image directly, skipping the network request. (6.1.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.1.0)
- Sets the degrees the pitch changes per pixel dragged. (6.1.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.1.0)
- Sets the degrees the bearing changes per pixel dragged. (6.1.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.1.0)
- Adds a paint property that applies opacity uniformly to the entire fill layer output. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- Custom layer argument objects now expose getProjectionData. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- Adds a paint property that applies opacity uniformly to the entire line layer output. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- Adds a resolver for supplying missing style images on demand, with synchronous or asynchronous callbacks. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- Adds rollstart, roll, rollend, and style.load events to the event type map. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- Adds a shared event type for camera-transition events, including move, zoom, rotate, pitch, roll, and drag events and their start/end variants. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- Adds an option to preserve raw RGBA tile values when alpha represents data rather than opacity. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- Adds a map creation option to remove visually unappealing vertical artifacts when terrain is used with a transparent background. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)

### Performance

- Symbol layout skips line breaking for labels that fit on one line, speeding up layout. (6.13.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.13.0)
- Speeds up symbol rendering when visible tiles change by rewriting opacity buffers only for symbol buckets whose labels changed. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- Projection data is uploaded once per tile per frame instead of before every draw call, improving rendering performance. (6.11.2) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.2)
- An addProtocol handler may return an ImageBitmap or HTMLImageElement for an image resource, avoiding encoding and decoding the pixels again. (6.11.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.0)
- Cross-tile symbol matching is faster for sources with promoteId because symbols are keyed by feature id as well as label. (6.11.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.0)
- Tile coverage computation skips the loaded-tile scan for layers with a constant symbol-height-offset. (6.11.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.0)
- Triangulation is faster because each vertex's deduplicated index is looked up once instead of hashing every triangle corner and applicable ring outline point. (6.10.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.10.0)
- Marker terrain occlusion uses a CPU ray walk over the DEM instead of a depth-buffer readback, removing a GPU stall per marker while a terrain map moves. (6.10.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.10.0)
- Pooled terrain drape textures are freed when the map is at rest or terrain is removed, rather than remaining allocated for the map's lifetime. (6.10.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.10.0)
- The rounding distance is converted to tile units once per tile instead of once per feature. (6.9.1) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.1)
- The scale control no longer forces synchronous layout or rewrites its DOM on every pan or zoom frame. (6.9.1) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.1)
- Merging adjacent line-placement features that share a label is faster for chains of features. (6.9.1) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.1)
- Reads sprite and image pixels through OffscreenCanvas where available, removing a main-thread stall of tens of milliseconds on GPU-accelerated browsers when a sprite loads. (6.9.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.0)
- Re-renders at most one stale terrain drape per frame and keeps drapes that differ only by zoom while the map moves, avoiding a burst of tile re-renders when a finger lifts over terrain. (6.9.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.0)
- Skips clipping masks for layers hidden at the current zoom and avoids re-binding dynamic buffers on cached vertex array binds, reducing redundant WebGL calls every frame. (6.9.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.0)
- Instances used for text shaping are built on first use instead of at import, reducing main-thread loading time. (6.8.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.8.0)
- The default pin is built once and cloned per marker, roughly halving constructor time when creating many default markers. (6.8.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.8.0)
- Shader programs are linked before their compile status is read, allowing the driver to overlap compiles and reducing main-thread waiting. (6.8.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.8.0)
- Symbol re-placement is skipped when its inputs are unchanged, reducing repaints from animated style images or custom layers to a single frame. (6.7.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.7.0)
- With {validate: false}, style setters skip building an error-context style snapshot, avoiding repeated full-style serialization when adding layers one at a time. (6.7.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.7.0)
- Uploads the color-relief DEM texture once per tile instead of on every frame. (6.6.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.6.0)
- Picks terrain coordinates with a CPU raycast against the DEM, providing full DEM resolution, avoiding GPU stalls on pointer events, and using about 4MB less GPU memory. (6.6.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.6.0)
- Cross-tile symbol matching avoids a per-query sort, reducing main-thread placement cost on dense or coincident symbol layers. (6.4.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.4.0)
- Improves Mercator rendering performance by skipping a redundant clipping mask border pass. (6.2.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.2.0)
- Improves terrain elevation sampling performance by caching DEM tile lookups and coordinate transforms within each render. (6.2.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.2.0)

### Behavior and default changes

- The globe center can now reach the poles; it previously stopped at 85.05°. (6.13.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.13.0)
- Requests, caches, and atlases now support multiple glyph variants. (6.11.2) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.2)
- A contextmenu map event now fires on long press for touch devices. (6.11.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.0)
- The sky is shown in globe view and fades out with altitude instead of with the globe-to-Mercator transition. (6.10.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.10.0)
- Improves drawing of Devanagari, Khmer, Burmese and other complex scripts, and renders Arabic and Hebrew labels correctly without a right-to-left text plugin. (6.9.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.0)
- When the canvas is clamped to maxCanvasSize, MapLibre now warns once instead of silently lowering the rendered resolution. (6.8.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.8.0)
- Samples terrain render-to-texture output through mipmaps with trilinear filtering, reducing shimmering and aliasing in draped layers at high pitch. (6.8.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.8.0)
- Thai, Khmer, Burmese, Lao, Tibetan, Javanese and Balinese labels wrap at word boundaries in every style, whether or not it declares font-faces. (6.7.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.7.0)
- Default draggable markers are keyboard-focusable and movable with arrow keys; custom marker elements remain application-owned. (6.4.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.4.0)
- A grab cursor is shown over draggable markers, including on non-interactive maps. (6.1.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.1.0)
- WebGL availability errors can now be observed through the error event. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- Evented is now abstract and generic over an event-type map, providing subclasses with strongly typed on, once, and off methods. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- The getter now returns the actual property type instead of string or any. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- The getter now returns the actual property type instead of string or any. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- Hash-based location parsing now uses URLSearchParams, changing some edge-case parsing and normalization behavior. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- Map now composes Camera and extends Evented directly, forwarding the camera API rather than inheriting it. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- The ESM build loads its worker as a real URL, so the CSP directive no longer needs to allow blob workers. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)

### Tooling

- The setter now uses the actual property type instead of string or any. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- The setter now uses the actual property type instead of string or any. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)

### Fixes and other changes

- Works around blank, unresponsive maps on affected iPadOS 16 Safari devices. (6.14.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.14.0)
- Fixes circles with map pitch alignment being drawn too large while the globe transitions to mercator. (6.14.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.14.0)
- Preserves offset and around under prefers-reduced-motion so reduced-motion flights land at the same camera as animated ones. (6.14.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.14.0)
- Fixes idle never firing when the last tile fails with a status other than 404. (6.14.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.14.0)
- Fixes load never firing when the last tile fails with a status other than 404. (6.14.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.14.0)
- Fixes camera constraints with the vertical-perspective projection when calling map.resize(eventData, false). (6.14.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.14.0)
- Prevents a rendering crash when removing a feature-state property before feature state has been set. (6.14.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.14.0)
- Fixes ScaleControl throwing when its sample points miss the globe. (6.14.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.14.0)
- Prevents an uncaught error when setStyle is called while the WebGL context is lost. (6.14.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.14.0)
- Fixes the camera jumping back at the end of a pan, flick, or rotation into terrain. (6.14.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.14.0)
- Prevents the view from sliding hundreds of meters off center when terrain is switched on during a gesture. (6.14.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.14.0)
- The camera stays above terrain, avoiding scroll zoom taking it under a mountain and then throwing it kilometers up at the end of the zoom. (6.13.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.13.0)
- The function no longer returns NaN when two copies of the same point have a dot product slightly above 1. (6.13.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.13.0)
- The worker is self-contained again to prevent stale cached workers from crashing maps after upgrades, and its default URL carries the version as a v query parameter. (6.13.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.13.0)
- Sanitizes each attribution before joining them so an unclosed disallowed tag in one attribution does not erase the others. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- CanvasSource load errors are caught and reported through map.error, matching ImageSource. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- When false, a DEM with a minimum below sea level no longer keeps the map rendering at display rate instead of going idle. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- When false, easeTo and flyTo no longer pull the center elevation onto the terrain. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- Fixes color-relief with custom DEM encoding factors of 0, which previously packed every elevation stop to NaN and collapsed the color ramp. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- Fixes walls facing exactly east or west skipping the vertical gradient and rendering brighter than other walls. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- Fixes fill outlines and antialiased fill edges not being drawn when terrain is enabled. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- Prevents a removed source from continuing to send its waiting updates to the worker. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- Prevents clustering twice when called while new data is waiting to be sent. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- Prevents memory from growing until the page crashes when setData is called faster than the worker handles updates. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- Prevents data set with setData from being overwritten by an earlier URL load or updateData result. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- Prevents stale clusters on untouched tiles when clustering is turned on with setClusterOptions. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- Fixes a hole around the poles in background, fill, and line layers from zoom 3. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- When centerClampedToGround is false, jumpTo and setters that use it no longer pull the center elevation onto the terrain. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- Fixes line width distortion around joins. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- Camera constraints respect map padding so the padded viewport can pan fully to its edges. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- Fixes fill-extrusions missing from query results on a globe once it renders as mercator. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- Raster tiles now cross-fade when zooming out from a source's maxzoom instead of switching instantly. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- Fixes elevation readings returning 0 outside drawn tiles while the camera is below terrain, and makes that reading about 40 times cheaper. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- Prevents a gesture over terrain from throwing the camera when terrain under the center loads mid-gesture or terrain switches off before the gesture ends. (6.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.12.0)
- On globe projection, `fitBounds` and `cameraForBounds` now warn and return `undefined` when padding exceeds the viewport, as on mercator, instead of throwing. (6.11.2) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.2)
- Camera settings are no longer undone during camera movement with terrain or `transformCameraUpdate`. (6.11.2) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.2)
- During `easeTo` and `flyTo`, center elevation eases over terrain instead of being held and jumping when the animation ends. (6.11.2) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.2)
- The hillshade gradient toward the poles is removed. (6.11.2) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.2)
- The layer-specific listener now unsubscribes on the first event that hits the layer, rather than one that misses it. (6.11.2) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.2)
- Zooming and panning with the pointer above the horizon no longer moves the map in the opposite direction. (6.11.2) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.2)
- Raster tiles remain sharp at fractional `devicePixelRatio` when the canvas and backing store cover different numbers of device pixels. (6.11.2) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.2)
- The camera no longer jumps when a drag over terrain ends at a pitch above 84°. (6.11.2) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.2)
- Avoids sending dropped vector tiles to the worker during request transformation or worker startup, preventing parsed tiles from remaining in the worker for the map's lifetime. (6.11.1) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.1)
- Preserves promoteId when merging queued updateData diffs in a GeoJSON source. (6.11.1) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.1)
- Fixes camera jumping or bobbing during gestures over terrain and ensures terrain that loads after easeTo or flyTo is not ignored. (6.11.1) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.1)
- Worker script failures are now reported through the map error event. (6.11.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.0)
- Fixes slow panning and zooming in Firefox on macOS. (6.11.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.0)
- The globe atmosphere now fades in with camera altitude, keeping the horizon visible until the atmosphere takes over from space. (6.11.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.0)
- Markers and popups are no longer misplaced after a projection change or when terrain loads after the map settles. (6.11.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.0)
- When a value includes a -transition key, map.setSky() no longer silently keeps the old sky without firing an error event. (6.11.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.0)
- Source-specific tile LOD settings no longer change internal terrain render-to-texture tile selection. (6.11.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.11.0)
- Fixes hillshade rendering artifacts on mobile GPUs at high zoom levels. (6.10.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.10.0)
- Fixes partially blank maps in older Safari versions. (6.10.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.10.0)
- Fixes setStyle calling Map.setTerrain with the wrong this, which caused terrain changes in a style diff to throw. (6.10.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.10.0)
- DEM sampling for 3D terrain is aligned with hillshade and color-relief at cell centres. (6.9.1) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.1)
- Terrain no longer reads elevation from the wrong part of a parent DEM tile while the deepest DEM tile is loading. (6.9.1) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.1)
- Map layers no longer go missing after custom layer rendering. (6.9.1) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.1)
- Each feature is no longer rounded twice, preventing over-rounded corners and inflated vertex counts. (6.9.1) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.1)
- The gradient over 3D terrain is computed from the extrusion's own height rather than its height above sea level. (6.9.1) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.1)
- Locations behind the camera now project to a point outside the viewport on the side where they left the screen, moving DOM markers and popups off-screen as expected. (6.9.1) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.1)
- Setting one paint, light, or sky property no longer transitions every property, delays idle unnecessarily, or restarts ongoing transitions. (6.9.1) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.1)
- Raster tiles no longer get stuck at the start of a fade-in until the map moves. (6.9.1) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.1)
- Terrain depth is redrawn when DEM tiles arrive so occluded symbols and markers stay hidden. (6.9.1) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.1)
- Camera options passed as undefined are treated as not given instead of being coerced to NaN. (6.9.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.0)
- Camera options passed as undefined are treated as not given instead of being coerced to NaN. (6.9.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.0)
- A map created inside a hidden container no longer stays at the 400x300 fallback size when the container is shown before the resize observer's first notification. (6.9.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.0)
- Camera options passed as undefined are treated as not given instead of being coerced to NaN. (6.9.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.0)
- No longer throws when resized to zero width; projection matrix calculations are skipped while the transform has zero width or height. (6.9.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.0)
- Fixes a Not implemented. error that broke panning and zooming when the projection changed while the camera was moving on maps with terrain or a transformCameraUpdate callback. (6.9.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.0)
- No longer throws while terrain is loading when an intermediate render compiles a terrain shader before the replacement style initializes its projection. (6.9.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.0)
- Style updates no longer open a redundant sky and light transition that delays idle or eases sky and light on a different curve from the layers. (6.9.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.0)
- Queued GeoJSON property removals no longer throw after geometry-only updates or retain previously updated values. (6.9.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.9.0)
- Keeps the tile under an elevated symbol from being culled near the horizon, so symbols with large symbol-height-offset remain visible until behind the planet. (6.8.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.8.0)
- Draws an elevated symbol when it is in view but the ground beneath it is behind the horizon; occlusion follows the line of sight to the elevated point. (6.8.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.8.0)
- Empty tile responses, such as HTTP 204, are treated as no data: raster-DEM tiles load without elevation and empty raster tiles render transparently. (6.8.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.8.0)
- Returns sphere-following altitude under globe and vertical-perspective instead of NaN, restoring marker terrain occlusion and the camera terrain check. (6.8.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.8.0)
- Fixes a gap between the sky and ground at high pitch while the globe transitions to mercator. (6.8.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.8.0)
- Fixes visible seams between hillshade tiles when using linear interpolation. (6.8.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.8.0)
- Validates the before layer before reordering, leaving layer order untouched when its id does not exist. (6.8.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.8.0)
- A marker's popup no longer jumps to another world copy when the marker is moved across the antimeridian on a zoomed-out map. (6.8.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.8.0)
- Fixes the map freezing when a render task throws an error. (6.8.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.8.0)
- Fixes stale tile URLs when loadTile runs in the same frame. (6.8.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.8.0)
- Terrain drape textures are refreshed after zoom changes, avoiding stale rendering at the new zoom level. (6.8.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.8.0)
- The navigation control disables its zoom-out button when viewport constraints prevent further zooming out. (6.7.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.7.0)
- project() now agrees with the rendered terrain surface when elevation lookup samples a different DEM zoom than the drawn mesh. (6.7.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.7.0)
- queryTerrainElevation now agrees with the rendered terrain surface when elevation lookup samples a different DEM zoom than the drawn mesh. (6.7.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.7.0)
- Style state defaults are now serialized. (6.7.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.7.0)
- The camera no longer jumps at the end of a pan or zoom gesture on terrain because center elevation is sampled from the rendered terrain surface. (6.7.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.7.0)
- Numbers and short uppercase codes in vertical line labels are drawn upright instead of rotating along the line. (6.7.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.7.0)
- A vector tile retains its etag when reloaded after a style change, allowing the next expiry refresh to skip unchanged tiles. (6.7.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.7.0)
- Fixes style camera settings being ignored when the map is created with a minZoom or minPitch option. (6.6.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.6.0)
- Measures distances from the camera itself rather than the ground point below it, refining globe tile selection past the requested zoom in some views and leaving others coarser. (6.6.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.6.0)
- Fixes labels briefly appearing too large when zooming out several levels at once with zoom-dependent text-size or icon-size. (6.6.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.6.0)
- Fixes dragging the globe from the empty space around it so the map moves correctly. (6.5.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.5.0)
- Fixes an incorrect image source on globe view projection. (6.5.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.5.0)
- Fixes the globe zooming in when panned away from a pole at minimum zoom. (6.5.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.5.0)
- Provides custom layers with the live globe transition instead of a value hardcoded to 1, so they ease with other layers. (6.4.1) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.4.1)
- DEM and color-relief elevation stop lookups use texelFetch for exact values instead of normalized texture coordinate arithmetic. (6.4.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.4.0)
- Rounded extrusion corners no longer produce spikes; corner arcs land on the integer tile grid and corners created by tile clipping remain sharp. (6.4.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.4.0)
- Panning uses a versor to keep drag direction consistent near and across the poles, eases off near the globe edge, and preserves bearing. (6.4.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.4.0)
- A gesture held still before release no longer flings the map. (6.4.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.4.0)
- Raster-DEM decoding requests no browser color management so RGB-encoded elevation values are not changed. (6.4.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.4.0)
- Reloaded raster tiles no longer fade in again and briefly flash the map background. (6.4.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.4.0)
- Sprite reloads no longer cause images to be rechecked and re-uploaded on every frame, or leave replaced sprite images in the image manager. (6.4.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.4.0)
- A rejected missing-image resolver no longer blocks successfully resolved images in the same batch. (6.4.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.4.0)
- Aborts now reach image or raster tile loads still awaiting transformRequest, preventing lost images and fetching of aborted tiles. (6.4.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.4.0)
- Fixed scroll-wheel and two-finger pinch zoom drifting away from the pointer when the globe is small, keeping the location under the pointer as it does when zoomed in. (6.3.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.3.0)
- Fixed GPU texture leaks on image updates and removal for ImageSource, VideoSource, and CanvasSource, and fixed resized textures losing wrap and filter settings. (6.3.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.3.0)
- Fixed projective rendering for image source quads that are not parallelograms. (6.3.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.3.0)
- Fixed a race condition while tile data loads that could cause map.queryRenderedFeatures() to throw an "Out of bounds" error. (6.3.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.3.0)
- Terrain pan and zoom gestures are solved against the elevation under the gesture instead of frozen center elevation, preventing the grabbed terrain point from slipping during drags and moving-centroid pinches. (6.3.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.3.0)
- Fixes a rare rendering bug where two adjacent layers with different data driven properties could render incorrectly. (6.2.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.2.0)
- Prevents 3D buildings from disappearing near the horizon by growing tile-culling bounds as the frustum's bottom edge approaches horizontal. (6.1.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.1.0)
- Prevents fill and line layers from rendering twice near the antimeridian on the globe when looking at poles or zoomed out. (6.1.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.1.0)
- Improves globe latitude precision on some GPUs by reformulating the mercator-to-sphere Y coordinate calculation to avoid float32 cancellation and imprecise hardware transcendentals near the equator. (6.1.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.1.0)
- Fixes a race when an image is aborted during an awaited `transformRequest` that could crash the image request queue. (6.1.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.1.0)
- Fixes an error when a paint property transitions between arrays of different length. (6.1.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.1.0)
- Fixes a race when a tile is aborted during an awaited `transformRequest` that could crash the image request queue. (6.1.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.1.0)
- Calling this while the source contains errored tiles no longer crashes the renderer. (6.1.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.1.0)
- Calling this while the source contains errored tiles no longer crashes the renderer. (6.1.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.1.0)
- Non-interactive default markers use `role=img`; interactive markers use `role=button`. (6.1.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.1.0)
- Switching terrain configurations now destroys the previously active terrain, preventing GPU resource leaks and clearing the old source's terrain configuration. (6.1.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.1.0)
- Transparent overlapping lines using line-opacity no longer create rendering artifacts; transparent line-color stacking remains unchanged. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- raster-dem sources are now validated, and source types without a style-spec schema no longer fail the whole style. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- Terrain passed to setTerrain is now validated rather than applied unchecked. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)
- Style validation warnings are logged instead of treated as errors, so mixed legacy and expression filter syntax no longer aborts style loading. (6.0.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v6.0.0)

## maplibre-gl 5

### Breaking changes

- Removes legacy browser compatibility code targeting IE11 and pre-2016 browsers. (5.21.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.21.0)
- LngLatBounds#intersects now returns true when bounds touch along an edge or at a corner. (5.14.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.14.0)
- When the stylesheet has no root-level glyphs property, text-font is interpreted as a cascading fallback list, and text renders using local or system fonts. (5.11.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.11.0)

### New APIs and options

- Adds this CSS class to a Marker element when it is covered by 3D terrain or a globe. (5.23.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.23.0)
- Adds setZoomRate() to customize touch zoom speed. (5.23.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.23.0)
- Adds setZoomThreshold() to customize pinch sensitivity. (5.23.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.23.0)
- line-cap is now data-driven, allowing per-feature values. (5.22.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.22.0)
- line-miter-limit is now data-driven, allowing per-feature values. (5.22.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.22.0)
- Adds a referrerPolicy option to control the referrer policy for tile requests. (5.21.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.21.0)
- Accepts an async function in addition to a sync function. (5.21.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.21.0)
- Customize the action after Shift-drag box selection. (5.20.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.20.0)
- GeoJSON-VT now supports updates. (5.20.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.20.0)
- Use the resampling paint property with raster, hillshade, and color-relief layers. (5.20.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.20.0)
- Adds a map option setting the pitch above which the anisotropic filter is applied to all raster layers; its default is 20°. (5.19.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.19.0)
- The pseudo option forces CSS-based fullscreen mode instead of the native fullscreen API, which may be faster on some devices. (5.18.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.18.0)
- Markers now support click events. (5.18.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.18.0)
- Supports container elements from other windows, such as popups or iframes. (5.17.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.17.0)
- Adds zoomSnap to snap zoom levels to a configurable grid across keyboard, scroll wheel, on-screen buttons, double-click, and double-tap interactions. (5.17.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.17.0)
- Adds a padding option to keep popups from being positioned too close to the map container edges. (5.16.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.16.0)
- Global state expressions are supported for layer visibility. (5.15.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.15.0)
- Adds a waitForCompletion option to setData, allowing callers to configure whether it waits for completion. (5.13.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.13.0)
- Adds a waitForCompletion option to updateData, allowing callers to configure whether it waits for completion. (5.13.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.13.0)
- Vector source definitions support MapLibre Tiles by setting encoding to mlt. (5.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.12.0)
- The MapOptions flag controls how many zoom levels to slice and how many to scale; values of 4 or less can prevent Safari crashes in some scenarios. (5.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.12.0)
- A reduceMotion option is added to Map Options. (5.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.12.0)
- The timeControl API exports now() so external code can read controlled time. (5.11.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.11.0)
- Adds isTimeFrozen to the time control API for deterministic rendering, including frame-by-frame video export and deterministic testing. (5.10.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.10.0)
- Adds restoreNow to the time control API for deterministic rendering, including frame-by-frame video export and deterministic testing. (5.10.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.10.0)
- Adds setNow to the time control API for deterministic rendering, including frame-by-frame video export and deterministic testing. (5.10.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.10.0)
- Adds a Map option callback that overrides the transform's constrain behavior, with the new TransformConstrainFunction type. (5.10.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.10.0)

### Performance

- Halo and glyph are rendered in a single pass, reducing rendering time. (5.24.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.24.0)
- Matrix inversions are optimized to reduce GPU stalls. (5.24.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.24.0)
- Transparent symbols are culled early in vertex shaders to optimize GPU performance. (5.22.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.22.0)
- Vector tile reloading can use Etag unmodified support to optimize reloading. (5.20.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.20.0)
- GeoJSON setData performance was improved. (5.14.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.14.0)
- GeoJSON updateData performance was improved. (5.13.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.14.0), [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.13.0)
- Small diffs are processed faster when calling updateData. (5.11.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.11.0)

### Behavior and default changes

- Can now be used in workers, alongside improved communication with imported scripts in workers. (5.23.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.23.0)
- Marker and MarkerOptions now accept number values as well as string values for opacity. (5.23.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.23.0)
- Marker and MarkerOptions now accept number values as well as string values for opacityWhenCovered. (5.23.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.23.0)
- line-round-limit is now data-driven, allowing per-feature values. (5.22.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.22.0)
- Image requests always send the `Accept: image/webp` header; the Edge 18 WebP detection workaround is removed. (5.21.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.21.0)
- Adds compatibility for ES2020. (5.21.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.21.0)
- Error messages now include the source id, helping identify which source caused an error. (5.19.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.19.0)
- Text labels can include uncommon CJK and Vietnamese characters and characters from historical writing systems; server-side fonts can request glyph PBFs beyond U+FFFF instead of throwing an error. (5.13.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.13.0)

### Fixes and other changes

- Fog computation is skipped when fog opacity is zero. (5.24.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.24.0)
- Popup positions now update when switching between terrain and globe projections. (5.24.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.24.0)
- A successful custom protocol response that is null or undefined is now set to an empty ArrayBuffer. (5.23.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.23.0)
- Fixes convex polygon text labels drifting far from the center at high zoom due to coordinate rounding in geojson-vt. (5.23.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.23.0)
- Prevents stale asynchronous style loads from completing after the style is cleared or replaced, avoiding startup crashes. (5.22.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.22.0)
- Respects zoomSnap by snapping the zoom level to the nearest valid increment. (5.22.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.22.0)
- Respects the maxZoom option in vertical-perspective projection. (5.22.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.22.0)
- Respects zoomSnap by snapping the zoom level down to keep bounds fully visible. (5.22.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.22.0)
- Respects zoomSnap by snapping the zoom level down to keep bounds fully visible. (5.22.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.22.0)
- Respects zoomSnap by snapping the zoom level to the nearest valid increment. (5.22.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.22.0)
- Respects zoomSnap by snapping the zoom level to the nearest valid increment. (5.22.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.22.0)
- Calling map.remove() immediately after creation no longer crashes because in-flight style URL loads are canceled. (5.22.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.22.0)
- Error messages clarify when layout and paint properties are confused. (5.22.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.22.0)
- Error messages clarify when layout and paint properties are confused. (5.22.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.22.0)
- Fixes a crash when switching styles while globe projection is active. (5.22.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.22.0)
- Adds tolerance to GridIndex AABB comparison to prevent symbol collision flickering. (5.22.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.22.0)
- The geojson worker now receives the missing promoteId parameter. (5.21.1) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.21.1)
- Removes the map's `movestart` listener when the control is removed, preventing a leak and a possible crash during active tracking. (5.21.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.21.0)
- Removes the `click` listener when `remove()` is called, preventing the handler from leaking. (5.21.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.21.0)
- Fixes incorrect popup location when terrain is enabled and `jumpTo` is used. (5.21.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.21.0)
- Fixes missing tile encoding for MLT feature queries. (5.21.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.21.0)
- Fixes raster DEM tiles getting stuck in the `reloading` state. (5.21.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.21.0)
- Frees terrain GPU resources when terrain is disabled with `setTerrain(null)`. (5.21.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.21.0)
- Caps the tile texture reuse pool to prevent unbounded VRAM growth during rapid zoom and pan. (5.21.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.21.0)
- Removes the `playing` event listener and pauses video when the source is removed, fixing a memory leak. (5.21.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.21.0)
- Fixes updating GeoJSON when using diff update. (5.20.2) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.20.2)
- Fixes `raster-resampling: nearest` not being applied as expected. (5.20.1) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.20.1)
- Fixes a “cannot read properties of undefined (reading 'range')” error by updating geojson-vt. (5.20.1) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.20.1)
- Corrects distance-to-tile calculations in globe projection at high pitch angles. (5.20.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.20.0)
- Actor message filtering now allows opaque origins ("null"). (5.20.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.20.0)
- Tiles are now cleared when using vector tile source setUrl/setTiles. (5.20.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.20.0)
- Fixes the Firefox “Alpha-premult deprecated for non-DOM uploads” warning. (5.19.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.19.0)
- Fixes bounds calculation for GeoJSON with elevation. (5.19.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.19.0)
- Fixes SDF icon-text-fit rendering by correctly unpacking packed shader values. (5.19.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.19.0)
- The return type is more precise, improving type information for callers. (5.19.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.19.0)
- Fixes popup tip rendering on right-to-left pages. (5.19.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.19.0)
- Fixes raster tile rendering with glyph or icon atlas content after WebGL context loss. (5.19.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.19.0)
- GlobeControl now updates when Map.setProjection() is called programmatically. (5.18.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.18.0)
- Fixes intersection checks for zero-width bounds. (5.18.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.18.0)
- Fixes map.getProjection() returning undefined after map.setProjection() is called with the default mercator projection. (5.18.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.18.0)
- The pulsing GeoLocation animation is no longer displayed when the prefers-reduced-motion media query is active. (5.18.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.18.0)
- Fixes terrain tile updates when feature state changes. (5.18.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.18.0)
- Fixes incorrect text placement along lines in 3D mode. (5.18.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.18.0)
- Fixes a WebGL context loss error that occurred when the style was not yet loaded. (5.18.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.18.0)
- Fixes marker positions failing to update when zoom or pitch changes after constraints change. (5.17.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.17.0)
- Fixes incorrect shader selection for text labels containing inline images. (5.17.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.17.0)
- Leading and trailing control characters are hidden in format expressions. (5.16.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.16.0)
- Fixes a precision issue in the atmosphere shader in globe projection. (5.16.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.16.0)
- Fixes image sources being clipped at -180 and 180 longitude when terrain is enabled. (5.16.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.16.0)
- Fixes the map not immediately constraining to a valid zoom and center when changing projections. (5.16.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.16.0)
- Emits the style.load event when style changes are diffed, including when JSON is passed to setStyle. (5.16.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.16.0)
- Fixes setting visibility on custom layers. (5.16.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.16.0)
- Fixes a blank map when a resize event is triggered before WebGL context restoration. (5.16.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.16.0)
- A GeoJSON source no longer throws when properties are undefined. (5.15.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.15.0)
- Fixes the zoom used when retrieving elevation for a longitude and latitude. (5.15.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.15.0)
- Correctly handles bounds spanning 360° or more instead of returning false. (5.15.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.15.0)
- Calls transformCameraUpdate so subsequent zoom changes can be controlled by the user after changing minZoom; the same applies to setMaxZoom. (5.15.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.15.0)
- Canvas sources with power-of-2 dimensions no longer render as black squares. (5.14.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.14.0)
- Internally handled aborted requests no longer produce unhandled AbortError rejections, avoiding unhelpful client errors. (5.14.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.14.0)
- Fixed unwanted movement at high latitudes and freezes at low zoom when moving a pitched and rotated terrain map. (5.14.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.14.0)
- queryTerrainElevation now uses higher zoom level tiles when possible. (5.14.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.14.0)
- Includes miscellaneous bug fixes related to updateData. (5.13.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.13.0)
- Fixes a blank map after WebGL context restore. (5.12.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.12.0)
- Edge fading for unloaded tiles is fixed. (5.11.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.11.0)
- The control's CSS prevents its contents from wrapping. (5.11.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.11.0)
- When a required glyph is unavailable or lacks a character, MapLibre tries to render it locally instead of crashing. (5.11.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.11.0)
- Fixes contextmenu events not being blocked by scrolling. (5.10.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.10.0)
- Fixes blurry rounded caps on dashed lines. (5.10.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.10.0)
- Preserves flyTo padding when prefers-reduced-motion is enabled. (5.10.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.10.0)
- Fixes mousemove events not being blocked by scrolling. (5.10.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.10.0)
- Fixes setClusterOptions failing to trigger reclustering when no data changes are pending. (5.10.0) — [release notes](https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.10.0)
