Packages

mapbox-gl

3.34.2 · 3 Nov 2026SEE LICENSE IN LICENSE.txt6M / weekRepositoryHomepagenpmAtom feed

Your version

2.3.0

27 May 2021Where it was published

2.15.0 is the newest release of 2.x.

In short

7 new10 fixed1 internal

Release note

Features and improvements

  • Add configurable fog as a root style specification

  • Add support for data-driven expressions in line-dasharray and line-cap properties.

  • Add support for data-driven text-line-height

  • Add client-side elevation querying with map.queryTerrainElevation(lngLat) when terrain is active

  • Reduce GPU memory footprint when terrain is active by sharing a single depth stencil renderbuffer for all draping

  • Optimize tile cover by preventing unnecessary tile loads when terrain is active

  • Batch render DOM elements to avoid reflow (#10530, #10567) (h/t zarov)

Bug fixes

  • Fix style property transitions not invalidating the terrain render cache

  • Fix raster tile expiry data not being retained. (#10494) (h/t andycalder)

  • Fix undefined type error when removing line-gradient paint property

  • Fix unclustered points in a clustered GeoJSON source incorrectly snapping to a grid at high zoom levels.

  • Fix map.loadImage followed with a delay by map.addImage failing in Safari and Firefox.

  • Allow conditional display of formatted images in text

  • Fix fill-extrusion elevation underflow below sea level

  • Fix dashed lines with square line caps.

  • Fix markers sometimes throwing an error after being removed from a 3D map. (#10478) (h/t andycalder)

  • Set type=button on attribution button to prevent accidental form submit when map is nested in <form>