Packages

mapbox-gl

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

Your version

3.1.0

18 Jan 2024Where it was published

3.34.2 is the newest release of 3.x.

npm marks 3.1.0 as deprecated: v3.1.0 contained a bug affecting attribution. Mapbox terms require proper attribution. Users should upgrade to v3.1.2+ immediately to ensure they remain in compliance.

In short

9 new18 fixed

Release note

Features and improvements

  • Improve performance for maps with many textures (such as styles with satellite imagery), fixing excessive memory usage. (h/t @tristan-morris) #12924

  • Add raster-elevation property for elevating raster layers to a constant height (e.g. clouds over globe).

  • Add raster-emissive-strength and fill-extrusion-emissive-strength properties for controlling 3D lighting on buildings and raster layers.

  • Add Map getConfigProperty method for getting current style config values.

  • Add config support in terrain options.

  • Improve performance for pitched views with many fill extrusions on higher zoom levels.

  • Allow turning off the terrain that is defined in the imports on the root-level Style by setting it to null.

  • Allow the partial terrain exaggeration update without specifying the source.

  • Respect style schema restrictions (minValue, maxValue, stepValue, values, type) when evaluating config options.

Bug fixes

  • Fix an issue where center: [0, 0] and zoom: 0 map options were ignored in favor of style settings.

  • Fix an issue with the camera not taking the short route when animating between locations across the anti-meridian.

  • Fix an issue where a style with imports sometimes loaded in incomplete state.

  • Fix an issue with rendering styles with nested imports.

  • Fix an issue with sources not reloading when changing language and worldview.

  • Fix an issue where updating a style fragment URL didn't work correctly.

  • Fix an issue when adding a layer with explicit slot not taking precedence over the before parameter for layer order.

  • Fix an issue where updating an image before initial image is loaded produced an error. (h/t @maciejmatu) #12928

  • Fix an issue with incorrect collisions for elevated symbols.

  • Fix an issue with "camera-projection": "orthographic" not working in styles with imports.

  • Fix an issue with tiles sometimes missing in terrain mode on views from a hill down on a valley.

  • Fix compact attribution style when using global CSS that sets box-sizing: border-box. (h/t @simondriesen) #12982

  • Remove redundant aria-label attribute in attribution control that fails accessibility conformance. (h/t @maggiewachs) #12981

  • Disable terrain and hillshade when browser fingerprinting protection (e.g. in private browsing mode) prevents it from rendering correctly.

  • Fix layer rendering when import requests are failing.

  • Fix map load event not firing for the sources whose tiles are 404s.

  • Require either url or tiles for tiled sources during validation.

  • Validate for empty layer and source IDs in runtime.

Changes since v3.1.0-beta.1

Features and improvements

  • Allow turning off the terrain that is defined in the imports on the root-level Style by setting it to null.

  • Allow the partial terrain exaggeration update without specifying the source.

  • Respect style schema restrictions (minValue, maxValue, stepValue, values, type) when evaluating config options.

Bug fixes

  • Disable terrain and hillshade when browser fingerprinting protection (e.g. in private browsing mode) prevents it from rendering correctly.

  • Fix layer rendering when import requests are failing.

  • Fix map load event not firing for the sources whose tiles are 404s.

  • Require either url or tiles for tiled sources during validation.

  • Validate for empty layer and source IDs in runtime.