unstale

npm / maplibre-gl

maplibre-gl

What changed in maplibre-gl 2 to 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-27.

80 breaking5 security3 deprecations103 new APIs and options40 performance38 behavior and defaults2 tooling272 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

maplibre-gl 6285 changes

Breaking changes 17

  • 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.0release notes

  • 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.0release notes

  • 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.0release notes

  • The TypeScript target is now ES2022; consumers targeting older browsers or using older tooling may need to transpile MapLibre or update.

    6.0.0release notes

  • Nested GeoJSON objects are supported, with object properties now encoded using __$json__ before their values.

    6.0.0release notes

  • The method no longer returns this, so callers cannot rely on chaining its return value.

    6.0.0release notes

  • Removes the second waitForCompletion parameter.

    6.0.0release notes

  • Icon scaling with offset is disabled, changing rendering for affected icons.

    6.0.0release notes

  • Encountering legacy expressions now throws an error with warning severity instead of silently failing.

    6.0.0release notes

  • The internal transform property was removed; use Map's public API instead.

    6.0.0release notes

  • Renames the Map box-zoom handler event class from MapLibreZoomEvent to MapBoxZoomEvent.

    6.0.0release notes

  • Removed MapDataEvent; data events now use MapSourceDataEvent or MapStyleDataEvent, and source data events carry full source information.

    6.0.0release notes

  • 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.0release notes

  • Shader code that relied on the former #pragma mapbox must use #pragma maplibre.

    6.0.0release notes

  • This event is notify-only; it no longer allows supplying an image through the event callback.

    6.0.0release notes

  • WebGL v1 support has been removed and WebGL2 is required.

    6.0.0release notes

  • The default changed to 4, which can affect queryRenderedFeatures results and polygon center label rendering; set it to undefined to revert.

    6.0.0release notes

Security 4

  • Sanitizes each attribution before joining them so an unclosed disallowed tag in one attribution does not erase the others.

    5.24.1, 6.12.0release notesrelease notes

  • Attribution sanitization uses an allow list of tags and attributes, and inserts sanitized HTML as DOM nodes instead of re-parsing a serialized string.

    5.24.1, 6.11.1release notesrelease notes

  • Fixes DOM sanitization for iframe and srcdoc.

    5.24.1, 6.9.0release notesrelease notes

  • MapLibre GL JS: XSS Sanitizer Bypass in DOM.sanitize() via Live NamedNodeMap Removal Skip

    6.4.1security advisoryrelease notes

Deprecations 3

  • The aroundCenter option is deprecated in favor of the new dragRotate options.

    6.15.0release notes

  • 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.0release notes

  • Deprecated because Arabic and Hebrew labels now render correctly without loading a right-to-left text plugin.

    6.9.0release notes

New APIs and options 51

  • Adds getTransformRequest to accompany setTransformRequest.

    6.19.0release notes

  • Adds support for oklab() colors and the interpolate-oklab expression.

    6.19.0release notes

  • Adds support for oklch() colors and the interpolate-oklch expression.

    6.19.0release notes

  • Adds setTrustedTypesPolicy for pages that enforce Trusted Types.

    6.19.0release notes

  • Adds fill-layer-blend support.

    6.18.0release notes

  • Adds line-layer-blend support.

    6.18.0release notes

  • Adds raster-layer-blend support.

    6.18.0release notes

  • Adds an experimental vector source option that slices a missing tile from an ancestor.

    6.17.0release notes

  • Map#setMaxBounds can constrain one geographic axis without constraining the other.

    6.16.0release notes

  • The Map constructor accepts a transformStyle function, similar to the option in setStyle.

    6.16.0release notes

  • Adds an experimental API for registering a projection, enabling maps in custom planar coordinate reference systems with their own quad tile grid.

    6.15.0release notes

  • Projections registered with addProjection can use the hash option.

    6.15.0release notes

  • Adds a tile URL token for custom planar coordinate reference systems with their own quad tile grid.

    6.15.0release notes

  • Supports rotating around the pointer, or around the center with circular or linear movement, giving developers more control over turn and tilt gestures.

    6.15.0release notes

  • GeoJSON sources can be projected in workers on a map using a registered CRS, using a definition string and a projection handler.

    6.15.0release notes

  • Adds a built-in identity projection for maps in a custom planar CRS.

    6.15.0release notes

  • Adds an experimental API for removing a registered projection.

    6.15.0release notes

  • Pass globalState to new Map or setStyle to provide initial global state for the map style, overriding the style defaults.

    6.14.0release notes

  • An experimental custom-layer API lets layers drape what they draw over terrain and place objects on it on the GPU.

    6.13.0release notes

  • 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.0release notes

  • 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.0release notes

  • 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.0release notes

  • Adds absolutePadding to treat padding as the map's persistent padding instead of adding it to the current padding.

    6.12.0release notes

  • Adds an option to GeolocateControlOptions to control map zoom adjustments in line with Geolocation Position update accuracy while trackUserLocation is true.

    6.12.0release notes

  • Calculates camera options that place a geographic anchor at a screen position without moving the map.

    6.11.0release notes

  • Supports SDF rendering for fill patterns, using fill-color as the foreground color.

    6.8.0release notes

  • Returns the URL the style was loaded from, or null when the style was given as an object.

    6.8.0release notes

  • Styles can use the font-faces property, improving complex-script language rendering.

    6.7.0release notes

  • Adds a map method for getting font faces, supporting complex-script language rendering.

    6.7.0release notes

  • Adds a map method for setting font faces, supporting complex-script language rendering.

    6.7.0release notes

  • Adds Style#triggerSymbolPlacement to re-place symbols after movement that the map cannot detect itself.

    6.7.0release notes

  • 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.0release notes

  • Adds a layout property selecting whether the height offset is measured from the terrain surface or the zero elevation datum.

    6.6.0release notes

  • Adds a layout property that raises icons and text above the map.

    6.6.0release notes

  • Adds an experimental method for working with the selected image warp, with auto, perspective, and flat choices.

    6.5.0release notes

  • Adds an experimental method to choose an image warp of auto, perspective, or flat.

    6.5.0release notes

  • StyleImageInterface data can provide a renderWithWebGL callback to render style images on the GPU, improving performance for frequently changing images.

    6.3.0release notes

  • 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.0release notes

  • Gets a source's current cluster options: cluster, clusterMaxZoom and clusterRadius.

    6.1.0release notes

  • Expressions are now supported in sky.*, light.* and projection.type properties.

    6.1.0release notes

  • Accepts an already-decoded image directly, skipping the network request.

    6.1.0release notes

  • Sets the degrees the pitch changes per pixel dragged.

    6.1.0release notes

  • Sets the degrees the bearing changes per pixel dragged.

    6.1.0release notes

  • Adds a paint property that applies opacity uniformly to the entire fill layer output.

    6.0.0release notes

  • Custom layer argument objects now expose getProjectionData.

    6.0.0release notes

  • Adds a paint property that applies opacity uniformly to the entire line layer output.

    6.0.0release notes

  • Adds a resolver for supplying missing style images on demand, with synchronous or asynchronous callbacks.

    6.0.0release notes

  • Adds rollstart, roll, rollend, and style.load events to the event type map.

    6.0.0release notes

  • 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.0release notes

  • Adds an option to preserve raw RGBA tile values when alpha represents data rather than opacity.

    6.0.0release notes

  • Adds a map creation option to remove visually unappealing vertical artifacts when terrain is used with a transparent background.

    6.0.0release notes

Performance 28

  • Loading is faster for tiles whose layers list the same feature IDs twice in ascending order.

    6.18.0release notes

  • Redraws fewer layers on terrain when a custom layer's terrainTileRevision or a feature state changes.

    6.15.0release notes

  • Speeds up tile loading by skipping point labels in the tile buffer when a neighboring tile draws them.

    6.15.0release notes

  • Symbol layout skips line breaking for labels that fit on one line, speeding up layout.

    6.13.0release notes

  • Speeds up symbol rendering when visible tiles change by rewriting opacity buffers only for symbol buckets whose labels changed.

    6.12.0release notes

  • Projection data is uploaded once per tile per frame instead of before every draw call, improving rendering performance.

    6.11.2release notes

  • An addProtocol handler may return an ImageBitmap or HTMLImageElement for an image resource, avoiding encoding and decoding the pixels again.

    6.11.0release notes

  • Cross-tile symbol matching is faster for sources with promoteId because symbols are keyed by feature id as well as label.

    6.11.0release notes

  • Tile coverage computation skips the loaded-tile scan for layers with a constant symbol-height-offset.

    6.11.0release notes

  • 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.0release notes

  • 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.0release notes

  • 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.0release notes

  • The rounding distance is converted to tile units once per tile instead of once per feature.

    6.9.1release notes

  • The scale control no longer forces synchronous layout or rewrites its DOM on every pan or zoom frame.

    6.9.1release notes

  • Merging adjacent line-placement features that share a label is faster for chains of features.

    6.9.1release notes

  • 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.0release notes

  • 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.0release notes

  • 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.0release notes

  • Instances used for text shaping are built on first use instead of at import, reducing main-thread loading time.

    6.8.0release notes

  • The default pin is built once and cloned per marker, roughly halving constructor time when creating many default markers.

    6.8.0release notes

  • Shader programs are linked before their compile status is read, allowing the driver to overlap compiles and reducing main-thread waiting.

    6.8.0release notes

  • 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.0release notes

  • 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.0release notes

  • Uploads the color-relief DEM texture once per tile instead of on every frame.

    6.6.0release notes

  • 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.0release notes

  • Cross-tile symbol matching avoids a per-query sort, reducing main-thread placement cost on dense or coincident symbol layers.

    6.4.0release notes

  • Improves Mercator rendering performance by skipping a redundant clipping mask border pass.

    6.2.0release notes

  • Improves terrain elevation sampling performance by caching DEM tile lookups and coordinate transforms within each render.

    6.2.0release notes

Behavior and default changes 21

  • Ctrl + drag pans the map when dragRotate is disabled.

    6.19.0release notes

  • Rotation inertia now matches maplibre-native.

    6.18.0release notes

  • MLT requests send accept headers according to current capabilities.

    6.16.0release notes

  • Vertical labels rendered with font-faces support OpenType vert forms.

    6.15.0release notes

  • The globe center can now reach the poles; it previously stopped at 85.05°.

    6.13.0release notes

  • Requests, caches, and atlases now support multiple glyph variants.

    6.11.2release notes

  • A contextmenu map event now fires on long press for touch devices.

    6.11.0release notes

  • The sky is shown in globe view and fades out with altitude instead of with the globe-to-Mercator transition.

    6.10.0release notes

  • 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.0release notes

  • When the canvas is clamped to maxCanvasSize, MapLibre now warns once instead of silently lowering the rendered resolution.

    6.8.0release notes

  • Samples terrain render-to-texture output through mipmaps with trilinear filtering, reducing shimmering and aliasing in draped layers at high pitch.

    6.8.0release notes

  • 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.0release notes

  • Default draggable markers are keyboard-focusable and movable with arrow keys; custom marker elements remain application-owned.

    6.4.0release notes

  • A grab cursor is shown over draggable markers, including on non-interactive maps.

    6.1.0release notes

  • WebGL availability errors can now be observed through the error event.

    6.0.0release notes

  • Evented is now abstract and generic over an event-type map, providing subclasses with strongly typed on, once, and off methods.

    6.0.0release notes

  • The getter now returns the actual property type instead of string or any.

    6.0.0release notes

  • The getter now returns the actual property type instead of string or any.

    6.0.0release notes

  • Hash-based location parsing now uses URLSearchParams, changing some edge-case parsing and normalization behavior.

    6.0.0release notes

  • Map now composes Camera and extends Evented directly, forwarding the camera API rather than inheriting it.

    6.0.0release notes

  • The ESM build loads its worker as a real URL, so the CSP directive no longer needs to allow blob workers.

    6.0.0release notes

Tooling 2

  • The setter now uses the actual property type instead of string or any.

    6.0.0release notes

  • The setter now uses the actual property type instead of string or any.

    6.0.0release notes

Fixes and other changes 159

  • Fixes adding a layer whose inline source holds a DOM element such as a canvas.

    6.19.0release notes

  • Fixes pitch dragging jumping when terrain is turned off during the drag.

    6.19.0release notes

  • Fixes setMaxBounds throwing when the longitude bounds span 360 degrees.

    6.19.0release notes

  • Fixes drawing the text halo in a separate pass for cursive scripts.

    6.19.0release notes

  • Fixes variable-anchor text with text-overlap: always showing through the globe.

    6.19.0release notes

  • Fixes scaling an icon fitted to its text without growing the padding.

    6.18.0release notes

  • Fixes map jumping when dragging or zooming above or below the identity projection.

    6.18.0release notes

  • Fixes glitches between consecutive opacity or blend layers on Intel Gen12 with Mesa 24.3 to 25.3.1.

    6.18.0release notes

  • Fixes missing fill-extrusion walls and roofs in query results on the globe.

    6.18.0release notes

  • Fires move and zoom events when new bounds change the camera.

    6.18.0release notes

  • Fixes layers added with addLayer drawing nothing beyond their source's limit.

    6.17.0release notes

  • Fixes camera movement bugs by using task scheduling.

    6.17.0release notes

  • Keeps offset line labels in order when the line doubles back.

    6.17.0release notes

  • Fixes maps not loading from a file or in a sandboxed iframe.

    6.17.0release notes

  • Fixes symbol text and icons not rendering on iOS 15 due to an ANGLE shader compiler bug.

    6.17.0release notes

  • Images added with addImage no longer disappear in tiles reloaded after panning across 180°.

    6.16.0release notes

  • Maps no longer stop loading after iOS shuts down their background workers to save memory.

    6.16.0release notes

  • Characters covered by font-faces no longer switch to glyphs from the glyphs URL after their PBF range is downloaded.

    6.16.0release notes

  • getBounds no longer throws when a feature has a null geometry.

    6.16.0release notes

  • A queued update is no longer applied to a feature that a later call adds again.

    6.16.0release notes

  • Drawing a line layer with a constant line-dasharray no longer throws when dash positions were never set.

    6.16.0release notes

  • queryRenderedFeatures no longer misses part of a GeoJSON polygon whose ring does not repeat its first point.

    6.16.0release notes

  • Terrain no longer draws flat at low zoom when its tiles are at the DEM source's minzoom.

    6.16.0release notes

  • Expired vector tiles no longer error on their next reload when the server returns an unchanged ETag.

    6.16.0release notes

  • Vector tiles past the source's maxzoom load when slicing leaves a one-point line.

    6.16.0release notes

  • Resizing after WebGL context loss but before webglcontextlost fires no longer shrinks the map to a single stretched pixel.

    6.16.0release notes

  • Fixes Brahmic-script labels mixing fonts or dropping letters when a style has a glyphs URL.

    6.15.0release notes

  • Fixes a feature without coordinates remaining out of tiles after updateData supplies coordinates.

    6.15.0release notes

  • Fixes globe drag rotation being rounded to single precision.

    6.15.0release notes

  • Fixes load and idle firing before other tiles finish loading when one tile fails.

    6.15.0release notes

  • Fixes tile-border line grids in sliced overzoomed tiles when the source tile extent exceeds 4096 by scaling the clip buffer with the extent.

    6.15.0release notes

  • Fixes registered-projection maps going blank when their center crosses 180°.

    6.15.0release notes

  • Works around a Safari 26.6 and later regression that stopped tile loading after a page had been in the background.

    6.15.0release notes

  • Fixes .cjs fragments or query markers being treated as module worker URLs.

    6.15.0release notes

  • Prevents the camera from dropping to sea level while terrain beneath the center of a jumpTo, easeTo or flyTo loads.

    6.15.0release notes

  • Fixes terrain failing to find a tile's own DEM data when the DEM source maxzoom is below the terrain tile zoom.

    6.15.0release notes

  • Fixes world projections such as Equal Earth throwing and jumping when the mouse is in the space around the world.

    6.15.0release notes

  • Works around blank, unresponsive maps on affected iPadOS 16 Safari devices.

    6.14.0release notes

  • Fixes circles with map pitch alignment being drawn too large while the globe transitions to mercator.

    6.14.0release notes

  • Preserves offset and around under prefers-reduced-motion so reduced-motion flights land at the same camera as animated ones.

    6.14.0release notes

  • Fixes idle never firing when the last tile fails with a status other than 404.

    6.14.0release notes

  • Fixes load never firing when the last tile fails with a status other than 404.

    6.14.0release notes

  • Fixes camera constraints with the vertical-perspective projection when calling map.resize(eventData, false).

    6.14.0release notes

  • Prevents a rendering crash when removing a feature-state property before feature state has been set.

    6.14.0release notes

  • Fixes ScaleControl throwing when its sample points miss the globe.

    6.14.0release notes

  • Prevents an uncaught error when setStyle is called while the WebGL context is lost.

    6.14.0release notes

  • Fixes the camera jumping back at the end of a pan, flick, or rotation into terrain.

    6.14.0release notes

  • Prevents the view from sliding hundreds of meters off center when terrain is switched on during a gesture.

    6.14.0release notes

  • 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.0release notes

  • The function no longer returns NaN when two copies of the same point have a dot product slightly above 1.

    6.13.0release notes

  • 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.0release notes

  • CanvasSource load errors are caught and reported through map.error, matching ImageSource.

    6.12.0release notes

  • 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.0release notes

  • When false, easeTo and flyTo no longer pull the center elevation onto the terrain.

    6.12.0release notes

  • 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.0release notes

  • Fixes walls facing exactly east or west skipping the vertical gradient and rendering brighter than other walls.

    6.12.0release notes

  • Fixes fill outlines and antialiased fill edges not being drawn when terrain is enabled.

    6.12.0release notes

  • Prevents a removed source from continuing to send its waiting updates to the worker.

    6.12.0release notes

  • Prevents clustering twice when called while new data is waiting to be sent.

    6.12.0release notes

  • Prevents memory from growing until the page crashes when setData is called faster than the worker handles updates.

    6.12.0release notes

  • Prevents data set with setData from being overwritten by an earlier URL load or updateData result.

    6.12.0release notes

  • Prevents stale clusters on untouched tiles when clustering is turned on with setClusterOptions.

    6.12.0release notes

  • Fixes a hole around the poles in background, fill, and line layers from zoom 3.

    6.12.0release notes

  • When centerClampedToGround is false, jumpTo and setters that use it no longer pull the center elevation onto the terrain.

    6.12.0release notes

  • Fixes line width distortion around joins.

    6.12.0release notes

  • Camera constraints respect map padding so the padded viewport can pan fully to its edges.

    6.12.0release notes

  • Fixes fill-extrusions missing from query results on a globe once it renders as mercator.

    6.12.0release notes

  • Raster tiles now cross-fade when zooming out from a source's maxzoom instead of switching instantly.

    6.12.0release notes

  • Fixes elevation readings returning 0 outside drawn tiles while the camera is below terrain, and makes that reading about 40 times cheaper.

    6.12.0release notes

  • 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.0release notes

  • On globe projection, fitBounds and cameraForBounds now warn and return undefined when padding exceeds the viewport, as on mercator, instead of throwing.

    6.11.2release notes

  • Camera settings are no longer undone during camera movement with terrain or transformCameraUpdate.

    6.11.2release notes

  • During easeTo and flyTo, center elevation eases over terrain instead of being held and jumping when the animation ends.

    6.11.2release notes

  • The hillshade gradient toward the poles is removed.

    6.11.2release notes

  • The layer-specific listener now unsubscribes on the first event that hits the layer, rather than one that misses it.

    6.11.2release notes

  • Zooming and panning with the pointer above the horizon no longer moves the map in the opposite direction.

    6.11.2release notes

  • Raster tiles remain sharp at fractional devicePixelRatio when the canvas and backing store cover different numbers of device pixels.

    6.11.2release notes

  • The camera no longer jumps when a drag over terrain ends at a pitch above 84°.

    6.11.2release notes

  • 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.1release notes

  • Preserves promoteId when merging queued updateData diffs in a GeoJSON source.

    6.11.1release notes

  • Fixes camera jumping or bobbing during gestures over terrain and ensures terrain that loads after easeTo or flyTo is not ignored.

    6.11.1release notes

  • Worker script failures are now reported through the map error event.

    6.11.0release notes

  • Fixes slow panning and zooming in Firefox on macOS.

    6.11.0release notes

  • The globe atmosphere now fades in with camera altitude, keeping the horizon visible until the atmosphere takes over from space.

    6.11.0release notes

  • Markers and popups are no longer misplaced after a projection change or when terrain loads after the map settles.

    6.11.0release notes

  • When a value includes a -transition key, map.setSky() no longer silently keeps the old sky without firing an error event.

    6.11.0release notes

  • Source-specific tile LOD settings no longer change internal terrain render-to-texture tile selection.

    6.11.0release notes

  • Fixes hillshade rendering artifacts on mobile GPUs at high zoom levels.

    6.10.0release notes

  • Fixes partially blank maps in older Safari versions.

    6.10.0release notes

  • Fixes setStyle calling Map.setTerrain with the wrong this, which caused terrain changes in a style diff to throw.

    6.10.0release notes

  • DEM sampling for 3D terrain is aligned with hillshade and color-relief at cell centres.

    6.9.1release notes

  • Terrain no longer reads elevation from the wrong part of a parent DEM tile while the deepest DEM tile is loading.

    6.9.1release notes

  • Map layers no longer go missing after custom layer rendering.

    6.9.1release notes

  • Each feature is no longer rounded twice, preventing over-rounded corners and inflated vertex counts.

    6.9.1release notes

  • The gradient over 3D terrain is computed from the extrusion's own height rather than its height above sea level.

    6.9.1release notes

  • 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.1release notes

  • Setting one paint, light, or sky property no longer transitions every property, delays idle unnecessarily, or restarts ongoing transitions.

    6.9.1release notes

  • Raster tiles no longer get stuck at the start of a fade-in until the map moves.

    6.9.1release notes

  • Terrain depth is redrawn when DEM tiles arrive so occluded symbols and markers stay hidden.

    6.9.1release notes

  • 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.0release notes

  • Camera options passed as undefined are treated as not given instead of being coerced to NaN.

    6.9.0release notes

  • No longer throws when resized to zero width; projection matrix calculations are skipped while the transform has zero width or height.

    6.9.0release notes

  • 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.0release notes

  • No longer throws while terrain is loading when an intermediate render compiles a terrain shader before the replacement style initializes its projection.

    6.9.0release notes

  • 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.0release notes

  • Queued GeoJSON property removals no longer throw after geometry-only updates or retain previously updated values.

    6.9.0release notes

  • 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.0release notes

  • 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.0release notes

  • 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.0release notes

  • Returns sphere-following altitude under globe and vertical-perspective instead of NaN, restoring marker terrain occlusion and the camera terrain check.

    6.8.0release notes

  • Fixes a gap between the sky and ground at high pitch while the globe transitions to mercator.

    6.8.0release notes

  • Fixes visible seams between hillshade tiles when using linear interpolation.

    6.8.0release notes

  • Validates the before layer before reordering, leaving layer order untouched when its id does not exist.

    6.8.0release notes

  • 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.0release notes

  • Fixes the map freezing when a render task throws an error.

    6.8.0release notes

  • Fixes stale tile URLs when loadTile runs in the same frame.

    6.8.0release notes

  • Terrain drape textures are refreshed after zoom changes, avoiding stale rendering at the new zoom level.

    6.8.0release notes

  • The navigation control disables its zoom-out button when viewport constraints prevent further zooming out.

    6.7.0release notes

  • project() now agrees with the rendered terrain surface when elevation lookup samples a different DEM zoom than the drawn mesh.

    6.7.0release notes

  • queryTerrainElevation now agrees with the rendered terrain surface when elevation lookup samples a different DEM zoom than the drawn mesh.

    6.7.0release notes

  • Style state defaults are now serialized.

    6.7.0release notes

  • 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.0release notes

  • Numbers and short uppercase codes in vertical line labels are drawn upright instead of rotating along the line.

    6.7.0release notes

  • A vector tile retains its etag when reloaded after a style change, allowing the next expiry refresh to skip unchanged tiles.

    6.7.0release notes

  • Fixes style camera settings being ignored when the map is created with a minZoom or minPitch option.

    6.6.0release notes

  • 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.0release notes

  • Fixes labels briefly appearing too large when zooming out several levels at once with zoom-dependent text-size or icon-size.

    6.6.0release notes

  • Fixes dragging the globe from the empty space around it so the map moves correctly.

    6.5.0release notes

  • Fixes an incorrect image source on globe view projection.

    6.5.0release notes

  • Fixes the globe zooming in when panned away from a pole at minimum zoom.

    6.5.0release notes

  • Provides custom layers with the live globe transition instead of a value hardcoded to 1, so they ease with other layers.

    6.4.1release notes

  • DEM and color-relief elevation stop lookups use texelFetch for exact values instead of normalized texture coordinate arithmetic.

    6.4.0release notes

  • 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.0release notes

  • 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.0release notes

  • A gesture held still before release no longer flings the map.

    6.4.0release notes

  • Raster-DEM decoding requests no browser color management so RGB-encoded elevation values are not changed.

    6.4.0release notes

  • Reloaded raster tiles no longer fade in again and briefly flash the map background.

    6.4.0release notes

  • 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.0release notes

  • A rejected missing-image resolver no longer blocks successfully resolved images in the same batch.

    6.4.0release notes

  • Aborts now reach image or raster tile loads still awaiting transformRequest, preventing lost images and fetching of aborted tiles.

    6.4.0release notes

  • 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.0release notes

  • 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.0release notes

  • Fixed projective rendering for image source quads that are not parallelograms.

    6.3.0release notes

  • Fixed a race condition while tile data loads that could cause map.queryRenderedFeatures() to throw an "Out of bounds" error.

    6.3.0release notes

  • 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.0release notes

  • Fixes a rare rendering bug where two adjacent layers with different data driven properties could render incorrectly.

    6.2.0release notes

  • Prevents 3D buildings from disappearing near the horizon by growing tile-culling bounds as the frustum's bottom edge approaches horizontal.

    6.1.0release notes

  • Prevents fill and line layers from rendering twice near the antimeridian on the globe when looking at poles or zoomed out.

    6.1.0release notes

  • 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.0release notes

  • Fixes a race when an image is aborted during an awaited transformRequest that could crash the image request queue.

    6.1.0release notes

  • Fixes an error when a paint property transitions between arrays of different length.

    6.1.0release notes

  • Fixes a race when a tile is aborted during an awaited transformRequest that could crash the image request queue.

    6.1.0release notes

  • Calling this while the source contains errored tiles no longer crashes the renderer.

    6.1.0release notes

  • Non-interactive default markers use role=img; interactive markers use role=button.

    6.1.0release notes

  • Switching terrain configurations now destroys the previously active terrain, preventing GPU resource leaks and clearing the old source's terrain configuration.

    6.1.0release notes

  • Transparent overlapping lines using line-opacity no longer create rendering artifacts; transparent line-color stacking remains unchanged.

    6.0.0release notes

  • raster-dem sources are now validated, and source types without a style-spec schema no longer fail the whole style.

    6.0.0release notes

  • Terrain passed to setTerrain is now validated rather than applied unchecked.

    6.0.0release notes

  • Style validation warnings are logged instead of treated as errors, so mixed legacy and expression filter syntax no longer aborts style loading.

    6.0.0release notes

maplibre-gl 5154 changes

Breaking changes 8

  • Removes legacy browser compatibility code targeting IE11 and pre-2016 browsers.

    5.21.0release notes

  • LngLatBounds#intersects now returns true when bounds touch along an edge or at a corner.

    5.14.0release notes

  • 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.0release notes

  • Drag rotation now happens around the center of the screen.

    5.0.0release notes

  • The on method now returns a Subscription for easy unsubscribe; chained calls such as map.on('x').on('y') must be separate calls.

    5.0.0release notes

  • WebGL context options such as antialias, preserveDrawingBuffer, and failIfMajorPerformanceCaveat must now be set inside canvasContextAttributes on MapOptions.

    5.0.0release notes

  • When clustering circles, promoted IDs are used on non-clustered features and cluster_id on clustered features; previously, non-clustered feature IDs were undefined.

    5.0.0release notes

  • The method now returns actual altitude.

    5.0.0release notes

New APIs and options 36

  • Adds this CSS class to a Marker element when it is covered by 3D terrain or a globe.

    5.23.0release notes

  • Adds setZoomRate() to customize touch zoom speed.

    5.23.0release notes

  • Adds setZoomThreshold() to customize pinch sensitivity.

    5.23.0release notes

  • line-cap is now data-driven, allowing per-feature values.

    5.22.0release notes

  • line-miter-limit is now data-driven, allowing per-feature values.

    5.22.0release notes

  • Adds a referrerPolicy option to control the referrer policy for tile requests.

    5.21.0release notes

  • Accepts an async function in addition to a sync function.

    5.21.0release notes

  • Customize the action after Shift-drag box selection.

    5.20.0release notes

  • GeoJSON-VT now supports updates.

    5.20.0release notes

  • Use the resampling paint property with raster, hillshade, and color-relief layers.

    5.20.0release notes

  • Adds a map option setting the pitch above which the anisotropic filter is applied to all raster layers; its default is 20°.

    5.19.0release notes

  • The pseudo option forces CSS-based fullscreen mode instead of the native fullscreen API, which may be faster on some devices.

    5.18.0release notes

  • Markers now support click events.

    5.18.0release notes

  • Supports container elements from other windows, such as popups or iframes.

    5.17.0release notes

  • 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.0release notes

  • Adds a padding option to keep popups from being positioned too close to the map container edges.

    5.16.0release notes

  • Global state expressions are supported for layer visibility.

    5.15.0release notes

  • Adds a waitForCompletion option to setData, allowing callers to configure whether it waits for completion.

    5.13.0release notes

  • Adds a waitForCompletion option to updateData, allowing callers to configure whether it waits for completion.

    5.13.0release notes

  • Vector source definitions support MapLibre Tiles by setting encoding to mlt.

    5.12.0release notes

  • 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.0release notes

  • A reduceMotion option is added to Map Options.

    5.12.0release notes

  • The timeControl API exports now() so external code can read controlled time.

    5.11.0release notes

  • Adds isTimeFrozen to the time control API for deterministic rendering, including frame-by-frame video export and deterministic testing.

    5.10.0release notes

  • Adds restoreNow to the time control API for deterministic rendering, including frame-by-frame video export and deterministic testing.

    5.10.0release notes

  • Adds setNow to the time control API for deterministic rendering, including frame-by-frame video export and deterministic testing.

    5.10.0release notes

  • Adds a Map option callback that overrides the transform's constrain behavior, with the new TransformConstrainFunction type.

    5.10.0release notes

  • Camera roll angle is now supported.

    5.0.0release notes

  • The Event class is now exported.

    5.0.0release notes

  • Globe mode is now supported.

    5.0.0release notes

  • A new GlobeControl is available.

    5.0.0release notes

  • Set contextType inside canvasContextAttributes to choose which WebGL version to use.

    5.0.0release notes

  • Projection type expressions are supported.

    5.0.0release notes

  • An option is available to display a realistic atmosphere when using a Globe projection.

    5.0.0release notes

  • setVerticalFieldOfView() was added to the public API.

    5.0.0release notes

  • Vertical Perspective projection is now supported.

    5.0.0release notes

Performance 10

  • Halo and glyph are rendered in a single pass, reducing rendering time.

    5.24.0release notes

  • Matrix inversions are optimized to reduce GPU stalls.

    5.24.0release notes

  • Transparent symbols are culled early in vertex shaders to optimize GPU performance.

    5.22.0release notes

  • Vector tile reloading can use Etag unmodified support to optimize reloading.

    5.20.0release notes

  • GeoJSON setData performance was improved.

    5.14.0release notes

  • GeoJSON updateData performance was improved.

    5.13.0release notesrelease notes

  • Small diffs are processed faster when calling updateData.

    5.11.0release notes

  • The tile culling function has improved performance for globe.

    5.0.0release notes

  • Performance improved by using JavaScript Sets internally to assess layer membership.

    5.0.0release notes

  • Symbol collision performance improved for mercator and globe projections.

    5.0.0release notes

Behavior and default changes 12

  • Can now be used in workers, alongside improved communication with imported scripts in workers.

    5.23.0release notes

  • Marker and MarkerOptions now accept number values as well as string values for opacity.

    5.23.0release notes

  • Marker and MarkerOptions now accept number values as well as string values for opacityWhenCovered.

    5.23.0release notes

  • line-round-limit is now data-driven, allowing per-feature values.

    5.22.0release notes

  • Image requests always send the Accept: image/webp header; the Edge 18 WebP detection workaround is removed.

    5.21.0release notes

  • Adds compatibility for ES2020.

    5.21.0release notes

  • Error messages now include the source id, helping identify which source caused an error.

    5.19.0release notes

  • 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.0release notes

  • Drag rotation around the center is less abrupt.

    5.0.0release notes

  • The map now supports pitch angles greater than 90 degrees.

    5.0.0release notes

  • Terrain is now supported in Globe projection.

    5.0.0release notes

  • The runtime supports WebGL2 with fallback to WebGL1.

    5.0.0release notes

Fixes and other changes 88

  • Fog computation is skipped when fog opacity is zero.

    5.24.0release notes

  • Popup positions now update when switching between terrain and globe projections.

    5.24.0release notes

  • A successful custom protocol response that is null or undefined is now set to an empty ArrayBuffer.

    5.23.0release notes

  • Fixes convex polygon text labels drifting far from the center at high zoom due to coordinate rounding in geojson-vt.

    5.23.0release notes

  • Prevents stale asynchronous style loads from completing after the style is cleared or replaced, avoiding startup crashes.

    5.22.0release notes

  • Respects the maxZoom option in vertical-perspective projection.

    5.22.0release notes

  • Respects zoomSnap by snapping the zoom level down to keep bounds fully visible.

    5.22.0release notes

  • Respects zoomSnap by snapping the zoom level to the nearest valid increment.

    5.22.0release notes

  • Calling map.remove() immediately after creation no longer crashes because in-flight style URL loads are canceled.

    5.22.0release notes

  • Error messages clarify when layout and paint properties are confused.

    5.22.0release notes

  • Fixes a crash when switching styles while globe projection is active.

    5.22.0release notes

  • Adds tolerance to GridIndex AABB comparison to prevent symbol collision flickering.

    5.22.0release notes

  • The geojson worker now receives the missing promoteId parameter.

    5.21.1release notes

  • Removes the map's movestart listener when the control is removed, preventing a leak and a possible crash during active tracking.

    5.21.0release notes

  • Removes the click listener when remove() is called, preventing the handler from leaking.

    5.21.0release notes

  • Fixes incorrect popup location when terrain is enabled and jumpTo is used.

    5.21.0release notes

  • Fixes missing tile encoding for MLT feature queries.

    5.21.0release notes

  • Fixes raster DEM tiles getting stuck in the reloading state.

    5.21.0release notes

  • Frees terrain GPU resources when terrain is disabled with setTerrain(null).

    5.21.0release notes

  • Caps the tile texture reuse pool to prevent unbounded VRAM growth during rapid zoom and pan.

    5.21.0release notes

  • Removes the playing event listener and pauses video when the source is removed, fixing a memory leak.

    5.21.0release notes

  • Fixes updating GeoJSON when using diff update.

    5.20.2release notes

  • Fixes raster-resampling: nearest not being applied as expected.

    5.20.1release notes

  • Fixes a “cannot read properties of undefined (reading 'range')” error by updating geojson-vt.

    5.20.1release notes

  • Corrects distance-to-tile calculations in globe projection at high pitch angles.

    5.20.0release notes

  • Actor message filtering now allows opaque origins ("null").

    5.20.0release notes

  • Tiles are now cleared when using vector tile source setUrl/setTiles.

    5.20.0release notes

  • Fixes the Firefox “Alpha-premult deprecated for non-DOM uploads” warning.

    5.19.0release notes

  • Fixes bounds calculation for GeoJSON with elevation.

    5.19.0release notes

  • Fixes SDF icon-text-fit rendering by correctly unpacking packed shader values.

    5.19.0release notes

  • The return type is more precise, improving type information for callers.

    5.19.0release notes

  • Fixes popup tip rendering on right-to-left pages.

    5.19.0release notes

  • Fixes raster tile rendering with glyph or icon atlas content after WebGL context loss.

    5.19.0release notes

  • GlobeControl now updates when Map.setProjection() is called programmatically.

    5.18.0release notes

  • Fixes intersection checks for zero-width bounds.

    5.18.0release notes

  • Fixes map.getProjection() returning undefined after map.setProjection() is called with the default mercator projection.

    5.18.0release notes

  • The pulsing GeoLocation animation is no longer displayed when the prefers-reduced-motion media query is active.

    5.18.0release notes

  • Fixes terrain tile updates when feature state changes.

    5.18.0release notes

  • Fixes incorrect text placement along lines in 3D mode.

    5.18.0release notes

  • Fixes a WebGL context loss error that occurred when the style was not yet loaded.

    5.18.0release notes

  • Fixes marker positions failing to update when zoom or pitch changes after constraints change.

    5.17.0release notes

  • Fixes incorrect shader selection for text labels containing inline images.

    5.17.0release notes

  • Leading and trailing control characters are hidden in format expressions.

    5.16.0release notes

  • Fixes a precision issue in the atmosphere shader in globe projection.

    5.16.0release notes

  • Fixes image sources being clipped at -180 and 180 longitude when terrain is enabled.

    5.16.0release notes

  • Fixes the map not immediately constraining to a valid zoom and center when changing projections.

    5.16.0release notes

  • Emits the style.load event when style changes are diffed, including when JSON is passed to setStyle.

    5.16.0release notes

  • Fixes setting visibility on custom layers.

    5.16.0release notes

  • Fixes a blank map when a resize event is triggered before WebGL context restoration.

    5.16.0release notes

  • A GeoJSON source no longer throws when properties are undefined.

    5.15.0release notes

  • Fixes the zoom used when retrieving elevation for a longitude and latitude.

    5.15.0release notes

  • Correctly handles bounds spanning 360° or more instead of returning false.

    5.15.0release notes

  • Calls transformCameraUpdate so subsequent zoom changes can be controlled by the user after changing minZoom; the same applies to setMaxZoom.

    5.15.0release notes

  • Canvas sources with power-of-2 dimensions no longer render as black squares.

    5.14.0release notes

  • Internally handled aborted requests no longer produce unhandled AbortError rejections, avoiding unhelpful client errors.

    5.14.0release notes

  • Fixed unwanted movement at high latitudes and freezes at low zoom when moving a pitched and rotated terrain map.

    5.14.0release notes

  • queryTerrainElevation now uses higher zoom level tiles when possible.

    5.14.0release notes

  • Includes miscellaneous bug fixes related to updateData.

    5.13.0release notes

  • Fixes a blank map after WebGL context restore.

    5.12.0release notes

  • Edge fading for unloaded tiles is fixed.

    5.11.0release notes

  • The control's CSS prevents its contents from wrapping.

    5.11.0release notes

  • When a required glyph is unavailable or lacks a character, MapLibre tries to render it locally instead of crashing.

    5.11.0release notes

  • Fixes contextmenu events not being blocked by scrolling.

    5.10.0release notes

  • Fixes blurry rounded caps on dashed lines.

    5.10.0release notes

  • Preserves flyTo padding when prefers-reduced-motion is enabled.

    5.10.0release notes

  • Fixes mousemove events not being blocked by scrolling.

    5.10.0release notes

  • Fixes setClusterOptions failing to trigger reclustering when no data changes are pending.

    5.10.0release notes

  • Network fetching errors such as CORS, DNS, or malformed URL are exposed as AJAXError with HTTP request details on the error event.

    5.0.0release notes

  • Fixed custom 3D models disappearing during projection transition.

    5.0.0release notes

  • Fixed incorrect matrices supplied to globe custom layers after a projection transition to mercator.

    5.0.0release notes

  • Fixed padding not being applied in globe projection.

    5.0.0release notes

  • Fixed errors being swallowed and erroring requests not being reported to the error handler.

    5.0.0release notes

  • Fixed incorrect cluster radius scaling.

    5.0.0release notes

  • Fixed results from geometry-type filter expressions.

    5.0.0release notes

  • Fixed atmosphere blending improperly into the background.

    5.0.0release notes

  • Fixed the map center being incorrectly constrained when using globe.

    5.0.0release notes

  • Fixed children not being retained when using globe.

    5.0.0release notes

  • Fixed symbol size increasing when viewed from the poles.

    5.0.0release notes

  • Fixed holes at the poles and geometry artifacts when globe terrain is zoomed out too much.

    5.0.0release notes

  • Fixed raster tiles not rendering correctly when using globe and terrain.

    5.0.0release notes

  • Fixed parsing of an incorrect hash location.

    5.0.0release notes

  • Level of detail at high pitch angles is fixed by changing which tiles are loaded.

    5.0.0release notes

  • Fixed unwanted camera roll when motion is interrupted.

    5.0.0release notes

  • Smooth mouse wheel zooming is fixed.

    5.0.0release notes

  • Fixed a compass regression on Firefox and Safari.

    5.0.0release notes

  • Fixed raster tile sources not fetching updates after a request error.

    5.0.0release notes

  • Fixed loading of the RTL plugin.

    5.0.0release notes

  • Fixed a regression in rendering world copies.

    5.0.0release notes

maplibre-gl 437 changes

Breaking changes 24

  • addProtocol is promise-based and no longer uses callbacks or cancellation.

    4.0.0release notes

  • addSourceType is now part of the global maplibregl object rather than a per-map method; its script must be loaded with maplibregl.importScriptInWorkers.

    4.0.0release notes

  • The cooperativeGestures handler now provides enabled() and disabled() methods in place of the removed getter and setter functions.

    4.0.0release notes

  • The cooperative gesture configuration changed and no longer contains strings; use the locale variable for strings.

    4.0.0release notes

  • These cluster methods now return Promises instead of using callbacks.

    4.0.0release notes

  • getCooperativeGestures was removed in favor of the cooperativeGestures handler's enabled() and disabled() methods.

    4.0.0release notes

  • Use getMaxParallelImageRequests() instead of the maplibregl.maxParallelImageRequests global getter.

    4.0.0release notes

  • Use the named getVersion() function instead of the maplibregl.version global getter.

    4.0.0release notes

  • Use getWorkerCount() instead of the maplibregl.workerCount global getter.

    4.0.0release notes

  • Use getWorkerUrl() instead of the maplibregl.workerUrl global getter.

    4.0.0release notes

  • ImageRequest is now Promise-based.

    4.0.0release notes

  • map.loadImage now returns a Promise instead of using a callback.

    4.0.0release notes

  • Import a script in the worker thread so it can call addProtocol and removeProtocol; addSourceType now requires loading the script this way.

    4.0.0release notes

  • Attribution is now on by default, and attributionControl uses the type handled by the control.

    4.0.0release notes

  • MapOptions.customAttribution has been removed.

    4.0.0release notes

  • setCooperativeGestures was removed in favor of the cooperativeGestures handler's enabled() and disabled() methods.

    4.0.0release notes

  • Use setMaxParallelImageRequests(...) instead of assigning the maplibregl.maxParallelImageRequests global setter.

    4.0.0release notes

  • setRTLTextPlugin now returns a Promise instead of using a callback.

    4.0.0release notes

  • Use setWorkerCount(...) instead of assigning the maplibregl.workerCount global setter.

    4.0.0release notes

  • Use setWorkerUrl(...) instead of assigning the maplibregl.workerUrl global setter.

    4.0.0release notes

  • The Source interface now returns Promises instead of callbacks.

    4.0.0release notes

  • All sources are now promise-based.

    4.0.0release notes

  • The terrain enable/disable locale key was renamed to match the style of the other keys.

    4.0.0release notes

  • Underlying worker communication now uses Promises instead of callbacks, changing how custom WorkerSource implementations behave.

    4.0.0release notes

Security 1

  • Fixed an XSS security issue in Actor involving postMessage and onmessage.

    4.0.0release notes

New APIs and options 1

  • Marker gains an opacity option and a setOpacity method, allowing marker opacity to be configured and changed.

    4.0.0release notes

Behavior and default changes 1

  • Terrain is now supported when setStyle uses the diff method.

    4.0.0release notes

Fixes and other changes 10

  • Fixed bounds fitting with an asymmetrical camera viewport and bearing.

    4.0.0release notes

  • Fixed cooperative gesture prompts when scroll zoom is disabled.

    4.0.0release notes

  • Loading empty raster tiles with a 204 No Content response is now handled.

    4.0.0release notes

  • Fixed zooming outside the central globe when terrain 3D is enabled.

    4.0.0release notes

  • Labels no longer disappear when enabling terrain at high zoom.

    4.0.0release notes

  • The missing Map type is now exported in the declaration file.

    4.0.0release notes

  • Markers no longer remain transparent when terrain is disabled.

    4.0.0release notes

  • Mouse events are no longer shifted after a CSS scale transform on the map container.

    4.0.0release notes

  • The cursor no longer remains a pointer indefinitely after removing a popup with trackPointer active.

    4.0.0release notes

  • Wheel zoom now moves in the same direction above and below the horizon.

    4.0.0release notes

maplibre-gl 341 changes

Breaking changes 14

  • The cooperativeGestures overlay is now kept above map features, and meta-key detection behavior was changed.

    3.0.0release notes

  • The elevationOffset workaround was removed as rendering of areas below sea level was improved.

    3.0.0release notes

  • GeoJSON data is now a required field for a GeoJSON data source.

    3.0.0release notes

  • Non-spec hsl color syntax such as hsl(110, 0.7, 0.055) is no longer supported; use percentages instead.

    3.0.0release notes

  • The static LngLatBounds.fromLngLat method replaces LngLat.toBounds().

    3.0.0release notes

  • The terrain object moved from style.terrain to map.terrain.

    3.0.0release notes

  • The package was removed from the MapLibre API; reference it directly if needed.

    3.0.0release notes

  • Deprecated mapboxgl- CSS classes were removed; use maplibregl- instead.

    3.0.0release notes

  • The features property type is now MapGeoJSONFeature[] instead of GeoJSON.Feature[].

    3.0.0release notes

  • The default type of originalEvent is now unknown.

    3.0.0release notes

  • The map resizes when its container element is resized, and resize-related events now carry ResizeObserverEntry data instead of the previous originalEvent data.

    3.0.0release notes

  • Resize-related events now receive ResizeObserverEntry data rather than the previous originalEvent data.

    3.0.0release notes

  • The release completes the transition from WebGL1 to WebGL2, affecting browser support.

    3.0.0release notes

  • Worker count is restricted to a maximum of 1 except in Safari to improve control performance.

    3.0.0release notes

New APIs and options 14

  • A method was added to enable or disable cooperative gestures.

    3.0.0release notes

  • AnimationOptions gained freezeElevation to allow smooth camera movement in 3D.

    3.0.0release notes

  • FullscreenControl now emits fullscreenstart and fullscreenend events.

    3.0.0release notes

  • ImageSource requests can now be canceled.

    3.0.0release notes

  • Adds a method to get camera target elevation.

    3.0.0release notes

  • Retrieves previously loaded images.

    3.0.0release notes

  • The transformStyle option was added to map.setStyle.

    3.0.0release notes

  • The type was added to both queryRenderedFeatures parameters in map.ts.

    3.0.0release notes

  • Gets terrain elevation in meters at a specific point.

    3.0.0release notes

  • Updates cluster properties of added sources.

    3.0.0release notes

  • Style files can now contain multiple sprite declarations.

    3.0.0release notes

  • A callback was added to Map options to transform camera updates.

    3.0.0release notes

  • GeoJSONSource gained updateData for partial data updates.

    3.0.0release notes

  • A MapOption was added to allow disabling style validation for faster performance in production.

    3.0.0release notes

Performance 1

  • Sprite images are extracted on demand, reducing memory use and the number of getImageData calls.

    3.0.0release notes

Behavior and default changes 3

  • Pseudo (CSS) fullscreen was added as a fallback for iPhones.

    3.0.0release notes

  • NavigationControlOptions is now optional when creating a NavigationControl instance.

    3.0.0release notes

  • The once method now returns a promise to make async/await usage easier.

    3.0.0release notes

Fixes and other changes 9

  • Fixed handling of an addProtocol callback function returning an HTMLImageElement.

    3.0.0release notes

  • The property now reflects source loading state for sourcedata events.

    3.0.0release notes

  • Fixed a loading state that could appear never to finish when setData was called immediately after adding the source to a Map.

    3.0.0release notes

  • Fixed geolocation permission failure on iOS 16 web views with a fallback to window.navigator.geolocation.

    3.0.0release notes

  • Fixed an uncaught error caused by getElevation().

    3.0.0release notes

  • Fixed wrapped coordinates when fitBounds crosses the antimeridian.

    3.0.0release notes

  • Correctly handles coordinates supplied as { lng: number, lat: number }.

    3.0.0release notes

  • Fixed raster tiles being retained when raster-fade-duration is 0.

    3.0.0release notes

  • Fixed an exception when setStyle receives transformStyle on a map initialized without an initial style.

    3.0.0release notes

maplibre-gl 226 changes

Breaking changes 17

New APIs and options 1

Performance 1

Behavior and default changes 1

  • Allows maxPitch values up to 85; values greater than 60 are at the developer's own risk.

    2.0.0release notes

Fixes and other changes 6

  • Fixed loaded sometimes returning true while loads are still pending.

    2.0.0release notes

  • Fixed events firing after Map#remove when the WebGL context is lost and restored.

    2.0.0release notes

  • Fixed isSourceLoaded being true in GeoJSONSource dataloading event handlers.

    2.0.0release notes

  • Fixed the type definition for nested expressions.

    2.0.0release notes

  • Fixed the type check for non-DOM environments.

    2.0.0release notes

  • Fixed placeholder replacement to allow placeholders to appear more than once in a URL.

    2.0.0release notes