Skip to content

Releases: maplibre/maplibre-gl-js

v5.23.0

13 Apr 04:12
Immutable release. Only release title and notes can be modified.
7f61f6f

Choose a tag to compare

✨ Features and improvements

  • Add touchZoomRotate.setZoomRate() and touchZoomRotate.setZoomThreshold() to customize touch zoom speed and pinch sensitivity (#7271)
  • Improve ability to communicate with imported scripts in workers and use makeRequest in workres as well (#7451) (by @HarelM)
  • Allow opacity and opacityWhenCovered in Marker and MarkerOptions to accept number in addition to string, and add maplibregl-marker-covered CSS class to Marker element when covered by 3D terrain or a globe (#7433) (by @YuChunTsao)
  • perf: add a bench for terrain rendering and fix _demMatrixCache lookup being wasted cycles by actually using the cache (#7400) (by @CommanderStorm)

🐞 Bug fixes

  • Fix polygon text label placement drifting far from center for convex polygons at high zoom due to coordinate rounding in geojson-vt (#7380) (by @CommanderStorm)
  • Ensure that a successful ArrayBuffer response from a custom protocol that is null/undefined is set to an empty ArrayBuffer (#7427) (by @neodescis)
  • Fix error in _contextRestored when map was initialized without a style (#7432) (by @mvanhorn)
  • Fix issue with the cache used for zoomLevelsToOverscale feature (#7450) (by @HarelM)
  • Update stylelint and fix old issues with the CSS (mainly change rgb to use spaces) (#7365) (by @HarelM)

v5.22.0

03 Apr 12:57
Immutable release. Only release title and notes can be modified.
48caed8

Choose a tag to compare

✨ Features and improvements

  • Make line-cap, line-miter-limit, and line-round-limit data-driven properties, allowing per-feature values (#7351) (by @CommanderStorm)
  • GPU performance optimization: early culling of transparent symbols in vertex shaders (#7364) (by @xavierjs)
  • Add example showing how to measure map performance using built-in events (load, idle, render) (#7077) (by @CommanderStorm)
  • UX: Clarify error message language so if layout and paint properties are confused in setPaintProperty or setLayoutProperty (#6954) (by @Willjfield and @CommanderStorm)

🐞 Bug fixes

  • Fix startup crash caused by a stale async style load completing after the style was cleared or replaced (#7377)
  • Make fitBounds and fitScreenCoordinates respect the zoomSnap map option by snapping the zoom level down to keep bounds fully visible (#7332 (by @CommanderStorm)
  • Make jumpTo, easeTo, and flyTo respect the zoomSnap map option by snapping the zoom level to the nearest valid increment (#7333 (by @CommanderStorm)
  • Fix setState crash when switching styles while globe projection is active (#7314) (by @ashwinuae)
  • Prevent crashes when calling map.remove() immediately after creation by canceling in-flight style URL loads (#7368) (by @CommanderStorm)
  • Fixed symbol collision flickering by adding tolerance to GridIndex AABB comparison (#7360) (by @kkokkoejong)
  • Fix fitBounds ignoring maxZoom option in vertical-perspective projection (#7372) (by @CommanderStorm)
  • Prevent stale async style loads from completing after style clear (#7378) (by @Lievesley)
  • Fix broken example for fill-pattern (#7326) (by @k-yle)

v5.21.1

25 Mar 09:49
Immutable release. Only release title and notes can be modified.
1fe69fd

Choose a tag to compare

🐞 Bug fixes

  • Add missing promoteId parameter to geojson worker and refactor communication object (#7320) (by @HarelM)

v5.21.0

20 Mar 11:57
Immutable release. Only release title and notes can be modified.
44a48f8

Choose a tag to compare

✨ Features and improvements

  • Add compatibility for ES2020 (#7283) (by @claudiobgit)
  • Add referrerPolicy option to RequestParameters to allow controlling the referrer policy for tile requests (#7278) (by @Bingtagui404)
  • Wait for the GPU to finish its callstack for rendering benchmarks (#7285) (by @xavierjs)
  • Remove Edge 18 WebP detection workaround; always send Accept: image/webp header for image requests (#7293) (by @johanrd)
  • Remove legacy browser compatibility code targeting IE11 and pre-2016 browsers (#7294) (by @johanrd)
  • Remove legacy DOM.remove() and DOM.mouseButton() wrappers; use native APIs directly (baseline 2015) (#7295) (by @johanrd)
  • Make setTransformRequest accept an async function in addition to a sync function. (#7184) (by @kikuomax
    )

🐞 Bug fixes

  • Fix incorrect popup location in case of terrain and jumpTo (#7267) (by @HarelM)
  • Fix memory leak in VideoSource: remove playing event listener and pause video on source removal (#7279) (by @johanrd)
  • Fix memory leak where typed array views retained StructArray buffers after GPU upload, preventing garbage collection (#7280) (by @johanrd)
  • Fix raster DEM tiles getting stuck in "reloading" state (#7284) (by @katemihalikova)
  • Fix GeolocateControl leaking a movestart listener on the map after removal, which could also crash if the control was in active tracking state when removed (#7286) (by @johanrd)
  • Cap tile texture reuse pool to prevent unbounded VRAM growth during rapid zoom/pan (#7289) (by @johanrd)
  • Fix Marker click listener not removed on remove(), leaking the handler added in #7028 (#7287) (by @johanrd)
  • Fix Terrain GPU resource leak: free FBO, textures, and meshes when terrain is disabled via setTerrain(null) (#7288) (by @johanrd)
  • Fix guard against partial layout in PauseablePlacement (#7079) (by @garethbowker)
  • Fix missing tile encoding for MLT queryRenderedFeatures (#7056) (by @dannote and @ted-piotrowski)
  • Fix 3D Tiles example (#7275) (by @hh-hang)

v5.20.2

17 Mar 13:24
Immutable release. Only release title and notes can be modified.
109fa99

Choose a tag to compare

🐞 Bug fixes

  • Fix update GeoJSON when using diff update by updating geojson-vt package (#7257) (by @HarelM)

v5.20.1

13 Mar 12:08
Immutable release. Only release title and notes can be modified.
f293c20

Choose a tag to compare

🐞 Bug fixes

  • Fix cannot read properties of undefined (reading 'range') by updating geojson-vt package (#7245) (by @HarelM)
  • Fix a bug where raster-resampling: nearest was not applied as expected (#7247) (by @yano-h)

v5.20.0

10 Mar 23:10
Immutable release. Only release title and notes can be modified.
e9478ae

Choose a tag to compare

✨ Features and improvements

🐞 Bug fixes

  • Fix: Distance to tile is calculated incorrectly in globe projection for high pitch angles (#7219) (by @jtfedd)
  • Fix: Tiles are not cleared when using vector tile source setUrl/setTiles (#7185) (by @madoci)
  • Fix: Allow opaque origins ("null") in Actor message filtering (#7047) (by @pcardinal)

v5.19.0

23 Feb 07:48
Immutable release. Only release title and notes can be modified.
91dd083

Choose a tag to compare

✨ Features and improvements

  • Change the return type of LngLatBounds.toArray() to use a more precise type (#7156) (by @n4n5)
  • Add anisotropicFilterPitch map option to set the pitch above which the anisotropic filter is applied to all raster layers, the default of which is 20° (#7134) (by larsmaxfield)
  • Add source id to error message (#7107) (by HarelM)

🐞 Bug fixes

  • Fix SDF icon-text-fit rendering by correctly unpacking packed shader values in symbol_sdf.vertex.glsl, with render-test coverage (#7141, fixes #6953) (by @pcardinal)
  • Fix correct bounds calculation for GeoJSON with elevation (#6963) (by @simonmnt)
  • Fix: support elevation in bounds calculation (#7135) (by simonmnt)
  • Fix Firefox "Alpha-premult deprecated for non-DOM uploads" warning (#7128) (by @birkskyum)
  • Fix raster tiles rendering with glyph/icon atlas content after WebGL context loss (#7126) (by @birkskyum)
  • Fix popup tip in RTL pages (#7157) (by @HarelM)

v5.18.0

10 Feb 15:55
Immutable release. Only release title and notes can be modified.
a54d3d6

Choose a tag to compare

✨ Features and improvements

  • Add support for click events on Marker (#7028) (by @ganesh8068)
  • Simplify and abstract the GeoJSON Worker (#7058) (by @wayofthefuture)
  • Add pseudo option to FullscreenControl to force CSS-based fullscreen mode instead of native fullscreen API. Users might want this because this is faster on some devices (#7076) (by @CommanderStorm)
  • Migrate our API docs to zensical (#7071) (by CommanderStorm)

🐞 Bug fixes

  • Fix WebGL context loss error when style is not yet loaded (#7094) (by @kaigritun)
  • Fix updating terrain tiles on feature state changes (#6231) (by @pstaszek)
  • Fix LngLatBounds.intersects for zero-width bounds (#7055) (by @lucaswoj)
  • Fix GlobeControl not updating when Map.setProjection() is called programmatically (#7005, #7075) (by @CommanderStorm)
  • Fix map.getProjection() returning undefined after calling map.setProjection() with the default "mercator" projection (#7072)
  • Fix incorrect text placement along line in 3D mode (#7039) (by @russellporter)
  • When the prefers-reduced-motion media query is active, we now no longer display the pulsing GeoLocation animation (#7066) (by @CommanderStorm)

v5.17.0

27 Jan 15:33
Immutable release. Only release title and notes can be modified.
e00b513

Choose a tag to compare

✨ Features and improvements

  • Refactor _updateWorkerData (#6983) (by @wayofthefuture)
  • ⚠️ Add zoomSnap option to Map to allow snapping zoom levels to a grid when zooming in and out; aligns the behavior across all UI patterns (keyboard, scroll wheel, on-screen zoom buttons, double-click, double-tap). Previously, pressing +/- on the keyboard zoomed to rounded whole integers, more or less than 1 zoom level when starting from a fractional zoom. Now any number can be specified for zoomSnap; a value of 1.0 produces the rounded whole integer behavior across all UI patterns. (#6941) (by @mizmay)
  • Add support for container elements from different windows (e.g., popup or iframe) (#6969) (by @Syncret)
  • Migrate to @maplibre/geojson-vt (#6995) (by @HarelM)

🐞 Bug fixes

  • Fix incorrect shader selection for text labels with inline images (#6956) (by @ciscorn)
  • Fix marker positions not updating when zoom or pitch are changed following a change in constraints (#6925) (by auspicus)